HUB
Sign inSign up
php-fpm-ext logo

tackleza/php-fpm-ext

By tackleza

•Updated 10 days ago

PHP-FPM on Alpine with common extensions for reverse-proxy setups.

Image
Web servers
0

6.5K

tackleza/php-fpm-ext repository overview

⁠php-fpm-ext

A PHP-FPM image with a curated set of common extensions pre-installed.

⁠⚠️ This is NOT a standalone web server

This image does not include a web server. It only provides PHP-FPM. You must pair it with a frontend web server (Nginx, Caddy, Apache with mod_proxy_fcgi, etc.).

For a standalone PHP + Apache server, use tackleza/php-apache-ext⁠ instead.

⁠Available Tags

TagPHP VersionBase
8.2-alpinePHP 8.2Alpine Linux
8.3-alpinePHP 8.3Alpine Linux
8.4-alpinePHP 8.4Alpine Linux
8.5-alpinePHP 8.5Alpine Linux
latestPHP 8.5Alpine Linux

PHP 8.6 is a release candidate and is not intended for production. PHP 8.1 has been dropped (EOL).

⁠October 2026 PHP security update

The supported tags (8.2-alpine, 8.3-alpine, 8.4-alpine, 8.5-alpine, and latest) are rebuilt from official PHP images containing the fixes for CVE-2026-109618 and CVE-2026-109619⁠. The release build checks the PHP version, installed extensions, and PHP-FPM configuration before publication.

TagFixed PHP version
8.2-alpine8.2.35
8.3-alpine8.3.36
8.4-alpine8.4.27
8.5-alpine, latest8.5.12

Pull the updated tag and recreate your containers to use the fixed runtime. Existing running containers do not update automatically. You can check a pulled image with docker run --rm --entrypoint php tackleza/php-fpm-ext:8.5-alpine -r 'echo PHP_VERSION, PHP_EOL;'.

⁠Extension installation

Supported images install external extensions with PHP PIE⁠, pinned to version 1.5.2. Imagick 3.8.1, MongoDB 2.5.5, and Redis 6.3.0 come from version-pinned packages on Packagist⁠. PHP 8.4 and 8.5 also install the maintained IMAP package sirlouen/imap 1.1.2 through PIE; PHP 8.2 and 8.3 use their bundled IMAP extension. Other bundled extensions continue to use install-php-extensions.

Extension versions are intentionally pinned for repeatable builds. A PIE release or package update requires a new image build and validation; existing containers must be recreated after pulling an updated tag.

⁠Installed Extensions

ExtensionDescription
bcmathArbitrary precision mathematics
bz2Bzip2 compressed file support
calendarCalendar conversion
exifEXIF metadata in images
gdImage creation and manipulation
gettextNative language support (GNU gettext)
gmpGNU Multiple Precision arithmetic
imagickImageMagick integration
imapIMAP email protocol support
intlInternationalization (ICU)
mongodbMongoDB driver
mysqliMySQL Improved extension
opcachePHP bytecode cache
pcntlProcess control
pdo_mysqlPDO MySQL driver
redisRedis in-memory data store client
shmopShared memory operations
soapSOAP protocol support
socketsLow-level socket interface
sysvmsgSystem V message queues
sysvsemSystem V semaphores
sysvshmSystem V shared memory
tidyHTML/XML cleaner and repairer
xslXSLT transformations
zipZIP archive support

⁠Installed System Tools

  • Composer — PHP dependency manager
  • curl, git, nano, ping — common CLI utilities

⁠Usage

⁠Quick start with Nginx

1. Start the PHP-FPM container:

docker run -d \
  --name php-fpm \
  -v $(pwd)/data:/var/www/html \
  tackleza/php-fpm-ext:8.3-alpine

2. Add Nginx configuration:

server {
    listen 80;
    server_name example.com;
    root /var/www/html;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass php-fpm:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}
⁠Docker Compose example
services:
  nginx:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - ./data:/var/www/html
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - php

  php:
    image: tackleza/php-fpm-ext:8.3-alpine
    volumes:
      - ./data:/var/www/html
      - ./custom-php.ini:/usr/local/etc/php/conf.d/custom-php.ini

⁠Custom PHP Configuration

Mount your own .ini file to override or add PHP settings:

-v $(pwd)/custom-php.ini:/usr/local/etc/php/conf.d/custom-php.ini

Example custom-php.ini:

memory_limit = 512M
upload_max_filesize = 512M
post_max_size = 512M

⁠File Permissions

The container automatically remaps www-data to match the UID/GID of whoever owns the mounted /var/www directory. No manual chown needed — PHP-FPM can write files and the host user retains full access for git pull, deploy scripts, and live code editing.

ScenarioBehavior
Mount from /home/user_a (uid=1000)www-data remapped to uid=1000
Mount from /home/user_b (uid=1001)www-data remapped to uid=1001
Mount from /root (uid=0)No remapping (root owns everything)

To override the detected UID/GID explicitly:

docker run -e FPM_UID=$(id -u) -e FPM_GID=$(id -g) \
  -v $(pwd)/data:/var/www/html \
  tackleza/php-fpm-ext:8.3-alpine

⁠PHP Version Lifecycle

VersionStatusEOL Date
PHP 8.1❌ DroppedNov 2025
PHP 8.2✅ ActiveDec 2026
PHP 8.3✅ ActiveDec 2027
PHP 8.4✅ ActiveDec 2028
PHP 8.5✅ ActiveDec 2029

Tag summary

Content type

Image

Digest

sha256:b6318ea51…

Size

91.2 MB

Last updated

about 1 month ago

docker pull tackleza/php-fpm-ext