Skip to content

A lightweight and optimized PHP-FPM (PHP v7.4 and v8.0) with essential extensions on top of Alpine Linux.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

masumcity/alpine-php-fpm

 
 

Repository files navigation

Alpine PHP-FPM CI Docker Image

PHP-FPM (PHP v7.4 and v8.0) with essential extensions on top of Alpine Linux v3.14.

PHP 7.4

Docker Image Version (tag latest semver) Docker Image Size (tag)

PHP 8.0

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

Extension v7.4 v8.0
amqp
bcmath
exif
gd
gettext
gmp
imagick
intl
mcrypt
memcache
mysqli
oauth
pcntl
pdo_dblib
pdo_mysql
pdo_pgsql
pgsql
psr
soap
sockets
ssh2
tidy
vips
xmlrpc
xsl
yaml
swoole
sysvmsg
sysvsem
sysvshm
zip
     
Others
composer v2.0 v2.0

Install

🐳 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

Dockerfile

FROM joseluisq/php-fpm:7.4
# Or
FROM joseluisq/php-fpm:8.0

Environment variables

PHP-FPM and PHP configurations can be overwritten using environment variables. For do it, just indicates the substitution of values using ENV_SUBSTITUTION_ENABLE=true.

Below the environment variables with their default values:

PHP-FPM

Settings replaced into 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 php.ini file.

  • PHP_MEMORY_LIMIT=512M
  • PHP_SESSION_GC_MAXLIFETIME=1440

Example

A docker-compose example using a Nginx server can be found under ./sample directory.

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

About

A lightweight and optimized PHP-FPM (PHP v7.4 and v8.0) with essential extensions on top of Alpine Linux.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Dockerfile 77.1%
  • Shell 19.2%
  • Makefile 3.7%