Sign inSign up

fatk/php

By fatk

•Updated 4 days ago

php-fpm custom images loaded with extensions based on alpine

Image
Web servers
0

10K+

fatk/php repository overview

⁠Docker PHP Images

Optimized PHP-FPM Alpine images with comprehensive extensions for web hosting.

⁠Supported Versions

  • PHP 7.4
  • PHP 8.0
  • PHP 8.1
  • PHP 8.2
  • PHP 8.3
  • PHP 8.4

⁠Building Locally

Use the provided build script to build images locally:

./build.sh 8.4

This will:

  • Fetch the actual PHP version (e.g., 8.4.3)
  • Build the image with proper metadata
  • Tag as both fatk/php:8.4 and fatk/php:8.4.3

⁠Extensions provided

ExtensionDescription
xdebugA PHP extension for debugging and profiling PHP scripts. (PHP 8.0+ only)
gdA library for creating and manipulating images, with support for various image formats such as JPEG, PNG, WebP, and more.
exifReads and processes EXIF information from images, commonly used with JPEG and TIFF image files.
zipAdds the ability to create and read ZIP compressed archives in PHP scripts.
mysqliAn improved extension for interacting with MySQL databases.
pdoProvides a data-access abstraction layer, allowing you to interact with databases using a consistent interface.
pdo_mysqlA PDO driver specifically for MySQL databases, enabling PDO to interact with MySQL.
opcacheImproves PHP performance by caching compiled script bytecode in shared memory.
soapEnables PHP to interact with web services using the SOAP protocol.
intlProvides internationalization functions, including support for formatting dates, numbers, and currencies in a locale-aware manner.
xmlAdds support for working with XML documents, including parsing and transforming XML.
imagickA wrapper to the ImageMagick library, providing advanced image processing capabilities directly from PHP.
redisA redis client extension.

⁠Env variables

PHP SettingEnvironment VariableDefault ValueDescription
pm.max_childrenPHP_POOL_MAX_CHILDREN5Maximum number of children for pool.
pm.start_serversPHP_POOL_START_SERVERS2Number of child processes created on startup.
pm.min_spare_serversPHP_POOL_MIN_SPARE_SERVERS1Minimum number of idle child processes to have available.
pm.max_spare_serversPHP_POOL_MAX_SPARE_SERVERS3Maximum number of idle child processes allowed.
error_reportingPHP_ERROR_REPORTINGE_ALL & ~E_DEPRECATED & ~E_STRICTSets the level of error reporting in PHP.
memory_limitPHP_MEMORY_LIMIT128MMaximum amount of memory a script is allowed to consume.
post_max_sizePHP_POST_MAX_SIZE64MMaximum size of POST data that PHP will accept.
upload_max_filesizePHP_UPLOAD_MAX_FILESIZE64MMaximum size of an uploaded file.
max_execution_timePHP_MAX_EXECUTION_TIME180Maximum time in seconds a script is allowed to run before it is terminated.
date.timezonePHP_DATE_TIMEZONEAmerica/Sao_PauloDefines the default timezone used by all date/time functions in PHP.
opcache.enablePHP_OPCACHE_ENABLE1Enables or disables the OPcache.
opcache.memory_consumptionPHP_OPCACHE_MEMORY_CONSUMPTION64Amount of memory OPcache will use for storing precompiled scripts.
opcache.jitPHP_OPCACHE_JITtracingEnables or disables Just-In-Time compilation.
opcache.jit_buffer_sizePHP_OPCACHE_JIT_BUFFER_SIZE128MAmount of memory allocated for JIT compilation.
opcache.validate_timestampsPHP_OPCACHE_VALIDATE_TIMESTAMPS1Check for updated scripts compilation.
cli_memory_limitPHP_CLI_MEMORY_LIMIT-1Maximum memory a script can consume when run from the command line.

⁠Version-Specific Differences

⁠PHP 7.4
  • No xdebug extension (not compatible)
  • GD configured without AVIF support
⁠PHP 8.0
  • Includes xdebug
  • GD configured without AVIF support
⁠PHP 8.1+
  • Includes xdebug
  • GD configured with full AVIF support

⁠CI/CD

Images are automatically built:

  • On push to relevant files
  • Weekly on Mondays at 2 AM UTC
  • On manual workflow dispatch

The build process:

  1. Fetches the actual PHP version from Docker Hub
  2. Builds for both linux/amd64 and linux/arm64
  3. Tags with both short version (e.g., 8.4) and full version (e.g., 8.4.3)

Tag summary

Content type

Image

Digest

sha256:ef394939c…

Size

75.3 MB

Last updated

4 days ago

docker pull fatk/php:8.5.10