Comments (2)
You have to extend this image and make your own.
add this xdebug config in your build step:
.docker/php/conf.d/zz-xdebug.ini
zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.discover_client_host=true
xdebug.start_with_request=yes
xdebug.trigger_value=PHPSTORM
xdebug.log_level=0
xdebug.var_display_max_children=10
xdebug.var_display_max_data=10
xdebug.var_display_max_depth=10
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
You have to copy this file to the /etc/php82/conf.d folder in build step:
Dockerfile
:
FROM trafex/php-nginx:3.2.0
USER root
# Install composer from the official image
COPY --from=composer /usr/bin/composer /usr/bin/composer
ENV PHP_INI_DIR /etc/php82
RUN apk add --no-cache \
bash \
php82-iconv \
php82-pecl-xdebug
RUN ln -s /usr/bin/php82 /usr/bin/php
# disable annoying logs
RUN sed -i '/\[supervisord\]/a loglevel=error' /etc/supervisor/conf.d/supervisord.conf && \
sed -i 's/^;\?log_level = .*/log_level = error/' /etc/php82/php-fpm.conf
RUN mkdir -p /.composer; \
chown -R nobody.nobody /.composer
USER nobody
# custom php config
COPY .docker/php /etc/php82
from docker-php-nginx.
@C0mp4ct thank you for your example, I've added it to the documentation: https://github.com/TrafeX/docker-php-nginx/blob/master/docs/xdebug-support.md
from docker-php-nginx.
Related Issues (20)
- [Question] Turn off "nobody" user HOT 10
- Weird Issue with Volumes. HOT 4
- Unable to set custom DNS HOT 2
- Add php_ldap HOT 1
- supervisorctl not working HOT 2
- Optimize PHP-FPM with JIT HOT 3
- Clean up nginx config HOT 2
- vscode-server` HOT 4
- docker-php-nginx with PHP 8.3? HOT 1
- Newrelic APM support HOT 5
- application/javascript mime type is missing in gzip_types HOT 1
- image Performing a pressure test using Apache Benchmark (ab). HOT 1
- installing php extensions HOT 1
- Weird PSR-7 request target for current nginx default.conf with path info HOT 1
- Version mismatch (latest !=3.5.0 HOT 3
- I cannot run commands like "composer install" when using Windows WSL HOT 1
- where are php_errors written? HOT 2
- setting permission to properly handle file uploads
- Missing PDO HOT 4
- Not showing error 404
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-php-nginx.