Skip to content

Commit

Permalink
upgrade xdebug 2 -> 3, update php to php 7.4.27
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentinas Kasteckis committed Dec 18, 2021
1 parent 90bb9bb commit b35d0fd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use image which contains apache with php
FROM php:7.4.16-apache
FROM php:7.4.27-apache
RUN apt-get update && apt-get upgrade -y
# Install packages needed to install php extensions
RUN apt-get install git zlib1g-dev libxml2-dev libzip-dev zip unzip -y
Expand All @@ -16,10 +16,7 @@ RUN n stable
# Install sass compiler
RUN npm install -g sass
# Install XDEBUG
RUN pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_connect_back=1' >> /usr/local/etc/php/php.ini
RUN pecl install xdebug-3.1.2 && docker-php-ext-enable xdebug
# Install composer command
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
# Install symfony command
Expand Down
1 change: 1 addition & 0 deletions .docker/php/conf.d/error_reporting.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error_reporting=E_ALL
6 changes: 6 additions & 0 deletions .docker/php/conf.d/xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
zend_extension=xdebug

[xdebug]
xdebug.mode=develop,debug
xdebug.client_host=192.168.2.1
xdebug.start_with_request=yes
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Docker compose environment for Symfony (also works for Laravel or plain PHP) projects

# Summary of what is included
* PHP 7.4.16 with XDEBUG 2.9.8
* PHP 7.4.27 with XDEBUG 3.1.2
* Apache2
* MySQL 8.0
* PhpMyAdmin - manage MySQL
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ services:
volumes:
- ./:/var/www/html/
- ./.docker/virtualhost.conf:/etc/apache2/sites-available/000-default.conf
- ./.docker/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./.docker/php/conf.d/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini
ports:
- "80:80"
depends_on:
Expand Down

0 comments on commit b35d0fd

Please sign in to comment.