You don't need to replace the nginx configuration. With the byjg/php
image, you can adjust the NGINX configuration
and enable/disable modules. It fits for most users.
Any ENVIRONMENT variable can be accessible by your running PHP instance.
If set, will enable the PHP controller for the fpm-nginx
and fpm-apache
images, and
all requests will be directed to the PHP file specified.
docker run -e PHP_CONTROLLER=/app.php byjg/php:8.0-cli
Changes the server root. Defaults to /var/www/html
.
If set, will enable the FastCGI pass to the PHP-FPM server. Defaults to 127.0.0.1:9000
.
If set, with any value, will ignore the system environment variables in the PHP FPM.
If set, will enable serving HTTPS pages.
docker run -v /etc/ssl:/etc/ssl \
-e NGINX_SSL_CERT=/etc/ssl/my.cert \
-e NGINX_SSL_CERT_KEY=/etc/ssl/my.key \
byjg/php:8.0-fpm-nginx
All modules are installed by default. You can disable a module when you start the instance:
docker run -e DISABLEMODULE_DOM=true -e DISABLEMODULE_XSL=true byjg/php:8.0-cli
When you pass VERBOSE=true
, you can get a more verbose output about the entrypoint changes:
docker run -e VERBOSE=true byjg/php:8.0-cli
The name of the image that is running.
The PHP Version that is running (e.g. 8.2).
The PHP variant that is running (e.g. 8).
The date the image was built.