Sign inSign up

clevyr/php

By clevyr

Updated 3 months ago

Image
0

50K+

clevyr/php repository overview

PHP Base Image

Docker Build

An enhanced version of the default PHP Docker image which can install PHP extensions without requiring manual dependency installation using mlocati/docker-php-extension-installer and installs a default nginx setup.

Pull Command

The following command will retrieve an image with PHP 8.1 and Composer v2:

docker pull ghcr.io/clevyr/php:8.1

Alternative tags exist with Composer v1. If your application still requires Composer v1, you may add the version to the end of the tag:

docker pull ghcr.io/clevyr/php:8.1-composer1

Runtime Configuration

The following variables can be configured at build (Typically with an ARG in the Dockerfile) or during runtime (With environment variables).

PHP Configuration

Some php.ini values can be configured as a build arg.

Build ArgDescriptionDefault
PHP_MAX_EXECUTION_TIMESee max_execution_time.30
PHP_MAX_INPUT_VARSSee max_input_vars.1000
PHP_MEMORY_LIMITSee memory_limit.256M
PHP_POST_MAX_SIZESee post_max_size.32M
PHP_UPLOAD_MAX_FILESIZESee upload_max_filesize.8M
PHP_MAX_FILE_UPLOADSSee max_file_uploads.20
PHP-FPM Configuration
Environment VariableDescriptionDefault
PHP_FPM_PM_MAX_CHILDRENSee pm.max_children.20
PHP_FPM_PM_START_SERVERSSee pm.start_servers.2
PHP_FPM_PM_MIN_SPARE_SERVERSSee pm.min_spare_servers.1
PHP_FPM_PM_MAX_SPARE_SERVERSSee pm.max_spare_servers.3
PHP_FPM_PM_MAX_REQUESTSSee pm.max_requests.0

Build Arguments

The following variables can be only be configured at build.

Build ArgDescription
INSTALLPHP extensions to install. See here for available extensions.
DEPSapk dependencies to install during the build.
Nginx Configuration

Some nginx values can be configured as a build arg.

Build ArgNginx DirectiveDefault
NGINX_ROOTroot/app/public
NGINX_EXPIRESexpires7d
Legacy Build Arguments

These are the legacy build args. They will still be supported for the forseeable future, but they are not as powerful as the new INSTALL build arg, so if you are creating an app from scratch, the INSTALL build arg may be more useful for you. These are also convenient because they group up some extensnions. For example, if you set INSTALL_MYSQL=true, then both mysqli and pdo_mysql will be installed.

Build ArgDefault
INSTALL_BCMATHtrue
INSTALL_CALENDARfalse
INSTALL_EXIFfalse
INSTALL_GDtrue
INSTALL_IMAGICKfalse
INSTALL_INTLfalse
INSTALL_PCNTLfalse
INSTALL_MOSQUITTOfalse
INSTALL_MYSQLfalse
INSTALL_PGSQLtrue
INSTALL_REDISfalse
INSTALL_XDEBUGfalse
INSTALL_ZIPfalse

Tag summary

Content type

Image

Digest

sha256:d6acbd8cb

Size

65 MB

Last updated

3 months ago

docker pull clevyr/php