install-php-extensions xdebug
Last active
September 6, 2021 07:24
-
-
Save haipham22/841d7714920ab911204a9d266cdf113a to your computer and use it in GitHub Desktop.
PHP - Xdebug 3 Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.4-fpm-alpine | |
RUN mkdir -p /app | |
# Set working directory | |
WORKDIR /app | |
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | |
RUN chmod +x /usr/local/bin/install-php-extensions \ | |
&& sync \ | |
# && install-php-extensions @composer xdebug gd pdo_mysql mysqli zip exif \ | |
&& install-php-extensions @composer gd pdo_mysql mysqli zip exif \ | |
&& rm -rf /var/cache/apk/* | |
# Copy composer.lock and composer.json | |
COPY . /app | |
# Copy existing application directory contents | |
RUN chown -R www-data:www-data /app/ | |
USER www-data | |
# Expose port 9000 and start php-fpm server | |
EXPOSE 9000 | |
ENTRYPOINT ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[xdebug] | |
xdebug.mode=debug | |
xdebug.start_with_request=yes | |
xdebug.client_host=localhost | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment