First commit

This commit is contained in:
2023-03-12 01:35:53 +08:00
parent cb7fcbe36e
commit 55b3e917ac
5 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# Original: https://marioyepes.com/setup-debug-php-docker-visual-studio-code
ARG DOCKER_IMG_TAG
# Source image
FROM wordpress:${DOCKER_IMG_TAG}
# We're going to use this path multile times. So save it in a variable.
ARG XDEBUG_INI="/usr/local/etc/php/conf.d/xdebug.ini"
COPY ./wordpress-xdebug/plugins /root/wp-plugins
# Install AND configure Xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "[xdebug]" > $XDEBUG_INI \
&& echo "xdebug.mode = debug" >> $XDEBUG_INI \
&& echo "xdebug.start_with_request = trigger" >> $XDEBUG_INI \
&& echo "xdebug.client_port = 9003" >> $XDEBUG_INI \
&& echo "xdebug.client_host = 'host.docker.internal'" >> $XDEBUG_INI \
&& echo "xdebug.log = /tmp/xdebug.log" >> $XDEBUG_INI
RUN cp -Rf /root/wp-plugins/* /var/www/html/wp-content/plugins/ \
&& chown -R www-data:www-data /var/www/html/wp-content/plugins/