Add Xdebug to the PHP container build

This commit is contained in:
Alessandro Lai
2021-09-22 10:47:59 +02:00
committed by Alessandro
parent de42488ac9
commit ec6b1befdf
2 changed files with 14 additions and 0 deletions

View File

@@ -19,4 +19,12 @@ RUN addgroup -g $GID fig && adduser -D -G fig -u $UID fig \
&& mkdir /fig-website \
&& chown fig:fig /fig-website
WORKDIR /fig-website
RUN apk add --no-cache --virtual .xdebug-build-deps $PHPIZE_DEPS \
&& pecl install -o xdebug \
&& docker-php-ext-enable xdebug \
&& apk del .xdebug-build-deps \
&& pecl clear-cache \
&& docker-php-source delete
USER fig

6
docker/php/xdebug.ini Normal file
View File

@@ -0,0 +1,6 @@
[xdebug]
xdebug.client_port=9003
xdebug.start_with_request=yes
xdebug.log=/tmp/xdebug.log
xdebug.client_host=host.docker.internal
xdebug.mode=Off