joseluisq/php-fpm

By joseluisq

•Updated 7 months ago

Lightweight & optimized PHP-FPM 8.1,8.2,8.3 with essential extensions on top of latest Alpine Linux.

Image
Languages & frameworks
3

50K+

joseluisq/php-fpm repository overview

⁠Alpine PHP-FPM

⁠ Lightweight & optimized Multi-Arch Docker Images⁠ (x86_64/arm/arm64) for PHP-FPM⁠ (PHP 8.0⁠, 8.1⁠, 8.2⁠) with essential extensions on top of latest Alpine Linux. 🐘

View the repository on GitHub: https://github.com/joseluisq/alpine-php-fpm⁠

⁠Stable versions

v8.0v8.1v8.2
Docker Image Version (tag latest semver)
Docker Image Size (tag)
Docker Image Version (tag latest semver)
Docker Image Size (tag)
Docker Image Version (tag latest semver)
Docker Image Size (tag)
⁠Built-in extensions

curl, ftp, hash (mhash), libedit, libsodium, mbstring, mysqlnd, openssl, password-argon2, pdo-sqlite, pear, sqlite3, zlib

⁠Additional extensions
Extensionv8.0v8.1v8.2
amqpāœ“āœ“āœ“
apcuāœ“āœ“āœ“
bcmathāœ“āœ“āœ“
bz2āœ“āœ“āœ“
exifāœ“āœ“āœ“
gdāœ“āœ“āœ“
gettextāœ“āœ“āœ“
gmpāœ“āœ“āœ“
imagickāœ“āœ“āœ“
imapāœ“āœ“āœ“
intlāœ“āœ“āœ“
mcryptāœ“??
memcacheāœ“āœ“āœ“
mongodbāœ“āœ“āœ“
mysqliāœ“āœ“āœ“
oauthāœ“āœ“āœ“
opcacheāœ“āœ“āœ“
pcntlāœ“āœ“āœ“
pdo_dblibāœ“āœ“āœ“
pdo_mysqlāœ“āœ“āœ“
pdo_pgsqlāœ“āœ“āœ“
pdo_sqlsrvāœ“ (64-bit only)āœ“ (64-bit only)āœ“ (64-bit only)
pgsqlāœ“āœ“āœ“
phalcon?āœ“āœ“
psrāœ“āœ“āœ“
redisāœ“āœ“āœ“
rdkafkaāœ“āœ“āœ“
soapāœ“āœ“āœ“
socketsāœ“āœ“āœ“
sqlsrvāœ“ (64-bit only)āœ“ (64-bit only)āœ“ (64-bit only)
ssh2āœ“āœ“āœ“
swooleāœ“āœ“āœ“
sysvmsgāœ“āœ“āœ“
sysvsemāœ“āœ“āœ“
sysvshmāœ“āœ“āœ“
tidyāœ“āœ“āœ“
vipsāœ“āœ“āœ“
xslāœ“āœ“āœ“
yamlāœ“āœ“āœ“
zipāœ“āœ“āœ“
Ā Ā Ā Ā 
Others
composerv2.5v2.5v2.5

Footnotes

(?) It means that this extension is obsolete/unmaintained/discourage or simply is not supported yet.

⁠Usage

🐳 Available on Docker Hub → hub.docker.com/r/joseluisq/php-fpm⁠

docker pull joseluisq/php-fpm:7.4
# Or
docker pull joseluisq/php-fpm:8.0
# Or
docker pull joseluisq/php-fpm:8.1
⁠Dockerfile
FROM joseluisq/php-fpm:7.4
# Or
FROM joseluisq/php-fpm:8.0
# Or
FROM joseluisq/php-fpm:8.1
⁠Run a container

To give it a quick try just execute any of those commands and then navigate to localhost:8088⁠

docker run --rm -p 8088:80 joseluisq/php-fpm:8.1 sh -c "echo '<?php phpinfo();' > index.php; php -S [::]:80 -t ."
# Or
docker run --rm -p 8088:80 joseluisq/php-fpm:8.0 sh -c "echo '<?php phpinfo();' > index.php; php -S [::]:80 -t ."
# Or
docker run --rm -p 8088:80 joseluisq/php-fpm:7.4 sh -c "echo '<?php phpinfo();' > index.php; php -S [::]:80 -t ."

View Docker Compose Examples⁠

⁠Default Paths

  • Default Docker working directory: /var/www/html
  • Additional PHP .ini files to load: /usr/local/etc/php/conf.d
  • Custom PHP .ini file generated (only if ENV_SUBSTITUTION_ENABLE=true): /usr/local/etc/php/conf.d/default-php.ini

⁠Configurable Environment Variables

PHP-FPM and PHP configurations can be overwritten using environment variables. To do it so, just indicates the substitution of values using ENV_SUBSTITUTION_ENABLE=true (since it is disabled by default).

Below the environment variables with their default values:

⁠PHP-FPM
⁠Global FPM

Settings replaced into /usr/local/etc/php-fpm.conf file.

  • PHP_FPM_ERROR_LOG=/proc/self/fd/2
  • PHP_FPM_LOG_LEVEL=error
⁠FPM WWW Pool

Settings replaced into /usr/local/etc/php-fpm.d/www.conf file.

  • PHP_FPM_LISTEN=9000
  • PHP_FPM_USER=www-data
  • PHP_FPM_GROUP=www-data
  • PHP_FPM_LISTEN_OWNER=www-data
  • PHP_FPM_LISTEN_GROUP=www-data
⁠PHP Config

Settings replaced into /usr/local/etc/php/conf.d/default-php.ini file (php.ini).

  • PHP_MEMORY_LIMIT=512M
  • PHP_EXPOSE_PHP=On
  • PHP_SESSION_GC_MAXLIFETIME=1440

⁠Docker Compose Examples

docker-compose⁠ examples for Nginx⁠ and Apache⁠ servers can be found under the ./examples⁠ directory.

⁠Nginx
docker-compose -f examples/nginx/docker-compose.yml up
⁠Apache
docker-compose -f examples/apache/docker-compose.yml up

⁠Contributions

Feel free to send a pull request⁠ or file some issue⁠.

⁠Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.

Feel free to send some Pull request⁠ or issue⁠.

⁠License

This work is primarily distributed under the terms of both the MIT license⁠ and the Apache License (Version 2.0)⁠.

© 2020-present Jose Quintana⁠

Tag summary

Content type

Image

Digest

sha256:5547f9f54…

Size

99.3 MB

Last updated

7 months ago

docker pull joseluisq/php-fpm:8