This repository contains source code of janus1990/docker-nginx-php.
Nginx and PHP are compiled in a specific version. Consult the CHANGELOG.md file for further version details. PHP Composer is already installed and ready for use.
Xdebug is installed as shared extension, but not activated. Start the container with env ENABLE_XDEBUG=1 to enable the extension.
The Nginx and PHP-FPM master processes are controlled by Honcho. Honcho was chosen over Supervisor, because honcho will exit and kill the container if either Nginx or PHP's master process dye for any reason. If you want have to have the container restarted automatically, you may want to use Docker's restart policy.
docker run -v /path/to/php/source/:/usr/local/nginx/html/ janus1990/docker-nginx-php
# With restart policy
docker run --restart=always -v /path/to/php/source/:/usr/local/nginx/html/ janus1990/docker-nginx-phpYou by default, the image is configured to work out of the box, however you may add your own Nginx or PHP related configuration files.
Mount your custom nginx.conf file at /usr/local/nginx/conf/nginx.conf.
docker run -v /path/to/nginx.conf:/usr/local/nginx/conf/nginx.conf ... janus1990/docker-nginx-php
- Mount your custom
php-fpm.conffile at/usr/local/etc/php-fpm.conf. - Mount your custom
www.conffile at/usr/local/etc/www.conf. - Mount your custom
php.inifile at/usr/local/php/php.ini.
Xdebug was installed mainly with the idea of providing code coverage for PHPUnit. Thus it's not
configured for any specific use case. You can configure Xdebug via
php.ini if desired.
If you want to overwrite the default Honcho configuration - mount your custom Procfile file at /.
- Add HEALTHCHECK
- Add more support for composer in docker entrypoint.