This image provides a pre-configured environment for running PHP applications with Nginx and PHP-FPM.
FROM baimages/php-nginx:8.2-alpine
# copy the whole project to the default workdir /var/www
COPY . .
# define your startup command (optional)
CMD [ "my", "custom", "command" ]
To customize the nginx configuration, change the file located in /etc/nginx/nginx.conf as needed for the best
performance of your application. If you only want to change the root directory, use the environment variable NGINX_ROOT.
NGINX_ROOT: This is used to customize the Nginx root directory. Default is /var/www.NGINX_CLIENT_MAX_BODY_SIZE: The nginx client max body size. Default is 1M.NGINX_WORKER_PROCESS: This defines the number of Nginx worker processes, limited to 1024 connections each. Horizontal Pod Autoscaling (HPA) can scale up as needed. Default is 2.PHP_UPLOAD_MAX_FILESIZE: This variable sets the maximum allowed size for file uploads in PHP. Default is 2M.PHP_POST_MAX_SIZE: This variable determines the maximum size of POST data that PHP can accept. Default is 8MPHP_MEMORY_LIMIT: This environment variable sets the maximum amount of memory that PHP scripts are allowed to consume. Default is 128M.PHP_OPCACHE_VALIDATE_TIMESTAMPS: Checks if PHP scripts have been modified since they were cached. Default is 0,
but it is recommended to set to 1 in a development environment.PHP_OPCACHE_MAX_ACCELERATED_FILES: The maximum number of PHP scripts that can be cached by opcache. Default
is 10000.PHP_OPCACHE_MEMORY_CONSUMPTION: How much memory opcache can use. Default is 192.PHP_OPCACHE_MAX_WASTED_PERCENTAGE: The maximum amount of memory that can be wasted by opcache. Default is 10.PHP_OPCACHE_BLACKLIST_FILENAME: Specifies a file containing patterns to exclude from opcache. Empty by default.Content type
Image
Digest
sha256:1b7ffade0…
Size
57 MB
Last updated
8 months ago
docker pull baimages/php-nginx:7.3-alpine