{"id":13560988,"url":"https://github.com/joseluisq/alpine-php-fpm","last_synced_at":"2025-04-24T00:22:55.755Z","repository":{"id":37761937,"uuid":"247827755","full_name":"joseluisq/alpine-php-fpm","owner":"joseluisq","description":"Lightweight \u0026 optimized Multi-Arch Docker Images (x86_64/arm/arm64) for PHP-FPM (PHP 8.1, 8.2, 8.3) with essential extensions on top of latest Alpine Linux. :elephant:","archived":false,"fork":false,"pushed_at":"2025-04-16T20:09:54.000Z","size":343,"stargazers_count":213,"open_issues_count":1,"forks_count":48,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-19T07:43:25.382Z","etag":null,"topics":["alpine","alpine-linux","arm","arm64","armv6","armv7","composer","docker","docker-image","php","php-extensions","php-fpm","php7","php8","x86","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joseluisq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-16T22:23:34.000Z","updated_at":"2025-04-18T06:59:49.000Z","dependencies_parsed_at":"2023-01-31T08:01:01.044Z","dependency_job_id":"377fa9a2-363a-4aca-b077-994213831182","html_url":"https://github.com/joseluisq/alpine-php-fpm","commit_stats":{"total_commits":160,"total_committers":4,"mean_commits":40.0,"dds":0.07499999999999996,"last_synced_commit":"770c561443441d98660f7c106e9ac60aa41a1e7b"},"previous_names":[],"tags_count":122,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Falpine-php-fpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Falpine-php-fpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Falpine-php-fpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Falpine-php-fpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joseluisq","download_url":"https://codeload.github.com/joseluisq/alpine-php-fpm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250380553,"owners_count":21420971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","alpine-linux","arm","arm64","armv6","armv7","composer","docker","docker-image","php","php-extensions","php-fpm","php7","php8","x86","x86-64"],"created_at":"2024-08-01T13:00:51.416Z","updated_at":"2025-04-24T00:22:55.728Z","avatar_url":"https://github.com/joseluisq.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"\u003cdiv\u003e\n  \u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://php.net\"\u003e\n      \u003cimg\n        alt=\"PHP\"\n        src=\"https://www.php.net/images/logos/new-php-logo.svg\"\n        width=\"150\"\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n\n  \u003ch1 align=\"center\"\u003eAlpine PHP-FPM\u003c/h1\u003e\n\n  \u003ch4 align=\"center\"\u003e\n    Lightweight \u0026 optimized \u003ca href=\"https://www.docker.com/blog/how-to-rapidly-build-multi-architecture-images-with-buildx/\"\u003eMulti-Arch Docker Images\u003c/a\u003e (\u003ccode\u003ex86_64\u003c/code\u003e/\u003ccode\u003earm\u003c/code\u003e/\u003ccode\u003earm64\u003c/code\u003e) for \u003ca href=\"https://www.php.net/manual/en/install.fpm.php\"\u003ePHP-FPM\u003c/a\u003e (PHP \u003ca href=\"https://www.php.net/ChangeLog-8.php#PHP_8_1\"\u003e8.1\u003c/a\u003e, \u003ca href=\"https://www.php.net/ChangeLog-8.php#PHP_8_2\"\u003e8.2\u003c/a\u003e, \u003ca href=\"https://www.php.net/ChangeLog-8.php#PHP_8_3\"\u003e8.3\u003c/a\u003e, \u003ca href=\"https://www.php.net/ChangeLog-8.php#PHP_8_4\"\u003e8.4\u003c/a\u003e) with essential extensions on top of latest Alpine Linux. 🐘\n  \u003c/h4\u003e\n\n  \u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/joseluisq/alpine-php-fpm/actions/workflows/devel-8.4.yml\" title=\"devel 8.4 (latest)\"\u003e\u003cimg src=\"https://github.com/joseluisq/alpine-php-fpm/actions/workflows/devel-8.4.yml/badge.svg\"\u003e\u003c/a\u003e \n    \u003ca href=\"https://hub.docker.com/r/joseluisq/php-fpm/\" title=\"Docker Image Version (tag latest semver)\"\u003e\u003cimg src=\"https://img.shields.io/docker/v/joseluisq/php-fpm/8\"\u003e\u003c/a\u003e \n    \u003ca href=\"https://hub.docker.com/r/joseluisq/php-fpm/tags\" title=\"Docker Image Size (tag)\"\u003e\u003cimg src=\"https://img.shields.io/docker/image-size/joseluisq/php-fpm/8\"\u003e\u003c/a\u003e \n    \u003ca href=\"https://hub.docker.com/r/joseluisq/php-fpm/\" title=\"Docker Image\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/joseluisq/php-fpm.svg\"\u003e\u003c/a\u003e \n  \u003c/div\u003e\n\u003c/div\u003e\n\n## Stable versions\n\n|   v8.1 |   v8.2 |   v8.3 |   v8.4 |\n| -----: | -----: | -----: | -----: |\n| ![Docker Image 8.1 (tag 8.1 semver)](https://img.shields.io/docker/v/joseluisq/php-fpm/8.1)\u003cbr\u003e ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/joseluisq/php-fpm/8.1) | ![Docker Image 8.2 (tag 8.2 semver)](https://img.shields.io/docker/v/joseluisq/php-fpm/8.2)\u003cbr\u003e ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/joseluisq/php-fpm/8.2) | ![Docker Image 8.3 (tag 8.3 semver)](https://img.shields.io/docker/v/joseluisq/php-fpm/8.3)\u003cbr\u003e ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/joseluisq/php-fpm/8.3) | ![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/joseluisq/php-fpm/8.4)\u003cbr\u003e ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/joseluisq/php-fpm/8.4) |\n\n### PHP versions support\n\nWe **only** support stable PHP versions according to the [PHP Release Cycle](https://www.php.net/supported-versions.php). \nHowever, you can still find legacy versions like `7.4.x` or `8.0.x` on [Releases](https://github.com/joseluisq/alpine-php-fpm/releases) and [Docker Hub](https://hub.docker.com/r/joseluisq/php-fpm/).\n\n## Built-in extensions\n\n`curl`, `ftp`, `hash` (`mhash`), `libedit`, `libsodium`, `mbstring`, `mysqlnd`, `openssl`, `password-argon2`, `pdo-sqlite`, `pear`, `sqlite3`, `zlib`\n\n## Additional extensions\n\n| Extension  |   v8.1 |   v8.2 |   v8.3 |   v8.4 |\n| ---------- | -----: | -----: | -----: | -----: |\n| amqp       |      ✓ |      ✓ |      ✓ |      ✓ |\n| apcu       |      ✓ |      ✓ |      ✓ |      ✓ |\n| bcmath     |      ✓ |      ✓ |      ✓ |      ✓ |\n| bz2        |      ✓ |      ✓ |      ✓ |      ✓ |\n| exif       |      ✓ |      ✓ |      ✓ |      ✓ |\n| gd         |      ✓ |      ✓ |      ✓ |      ✓ |\n| gettext    |      ✓ |      ✓ |      ✓ |      ✓ |\n| gmp        |      ✓ |      ✓ |      ✓ |      ✓ |\n| imagick    |      ✓ |      ✓ |      ✓ |      ? |\n| igbinary   |      ✓ |      ✓ |      ✓ |      ✓ |\n| imap       |      ✓ |      ✓ |      ✓ |      ? |\n| intl       |      ✓ |      ✓ |      ✓ |      ✓ |\n| lz4        |      ✓ |      ✓ |      ✓ |      ✓ |\n| memcache   |      ✓ |      ✓ |      ✓ |      ✓ |\n| mongodb    |      ✓ |      ✓ |      ✓ |      ✓ |\n| msgpack    |      ✓ |      ✓ |      ✓ |      ✓ |\n| mysqli     |      ✓ |      ✓ |      ✓ |      ✓ |\n| oauth      |      ✓ |      ✓ |      ✓ |      ✓ |\n| opcache    |      ✓ |      ✓ |      ✓ |      ✓ |\n| pcntl      |      ✓ |      ✓ |      ✓ |      ✓ |\n| pdo_dblib  |      ✓ |      ✓ |      ✓ |      ✓ |\n| pdo_mysql  |      ✓ |      ✓ |      ✓ |      ✓ |\n| pdo_pgsql  |      ✓ |      ✓ |      ✓ |      ✓ |\n| pdo_sqlsrv |      ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |     ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |     ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |     ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |\n| pgsql      |      ✓ |      ✓ |      ✓ |      ✓ |\n| phalcon    |      ✓ |      ✓ |      ✓ |      ✓ |\n| psr        |      ✓ |      ✓ |      ✓ |      ✓ |\n| redis      |      ✓ |      ✓ |      ✓ |      ✓ |\n| rdkafka    |      ✓ |      ✓ |      ✓ |      ✓ |\n| soap       |      ✓ |      ✓ |      ✓ |      ✓ |\n| sockets    |      ✓ |      ✓ |      ✓ |      ✓ |\n| sqlsrv     |      ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |    ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |    ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |    ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |\n| ssh2       |      ✓ |      ✓ |      ✓ |\n| swoole     |      ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |      ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |      ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |      ✓ \u003csup\u003e(64-bit only)\u003c/sub\u003e |\n| sysvmsg    |      ✓ |      ✓ |      ✓ |      ✓ |\n| sysvsem    |      ✓ |      ✓ |      ✓ |      ✓ |\n| sysvshm    |      ✓ |      ✓ |      ✓ |      ✓ |\n| tidy       |      ✓ |      ✓ |      ✓ |      ✓ |\n| uuid       |      ✓ |      ✓ |      ✓ |      ✓ |\n| vips       |      ✓ |      ✓ |      ✓ |      ✓ |\n| xdebug     |      ✓ |      ✓ |      ✓ |      ✓ |\n| xsl        |      ✓ |      ✓ |      ✓ |      ✓ |\n| yaml       |      ✓ |      ✓ |      ✓ |      ✓ |\n| zip        |      ✓ |      ✓ |      ✓ |      ✓ |\n| zstd       |      ✓ |      ✓ |      ✓ |      ✓ |\n| \u0026nbsp;     | \u0026nbsp; | \u0026nbsp; | \u0026nbsp; | \u0026nbsp; |\n| **Others** |        |        |        |        |\n| composer   |   v2.8 |   v2.8 |   v2.8 |   v2.8 |\n| \u0026nbsp;     | \u0026nbsp; | \u0026nbsp; | \u0026nbsp; | \u0026nbsp; |\n| **Extensions file**   |   [8.1-fpm](8.1-fpm) |  [8.2-fpm](8.2-fpm)  |  [8.3-fpm](8.3-fpm/extensions.txt)  |  [8.4-fpm](8.4-fpm/extensions.txt)  |\n\n**Footnotes**\n\n- (?) It means that this extension is obsolete/unmaintained/discouraged or simply is not supported yet.\n- The `mcrypt` extension is obsolete. Use `libsodium` or `openssl` instead.\n\n### List all extensions included\n\nIf you want to know the whole list of the included extensions then type `php -m` as follows.\n\n```sh\ndocker run --rm joseluisq/php-fpm:8.4 php -m\n```\n\nOr use `php -i` to get more detailed information.\n\n## Usage\n\n```sh\ndocker pull joseluisq/php-fpm:8.4\n# Or\ndocker pull joseluisq/php-fpm:8.3\n# Or\ndocker pull joseluisq/php-fpm:8.2\n# Or\ndocker pull joseluisq/php-fpm:8.1\n```\n\n🐳 Available on Docker Hub → [hub.docker.com/r/joseluisq/php-fpm](https://hub.docker.com/r/joseluisq/php-fpm/)\n\n### Dockerfile\n\n```Dockerfile\nFROM joseluisq/php-fpm:8.4\n# Or\nFROM joseluisq/php-fpm:8.3\n# Or\nFROM joseluisq/php-fpm:8.2\n# Or\nFROM joseluisq/php-fpm:8.1\n```\n\n### Run a container\n\nTo give a Docker image a quick try, just execute any of those commands and then navigate to [localhost:8088](http://localhost:8088)\n\n```sh\ndocker run --rm -p 8088:80 joseluisq/php-fpm:8.4 sh -c \"echo '\u003c?php phpinfo();' \u003e index.php; php -S [::]:80 -t .\"\n# Or\ndocker run --rm -p 8088:80 joseluisq/php-fpm:8.3 sh -c \"echo '\u003c?php phpinfo();' \u003e index.php; php -S [::]:80 -t .\"\n# Or\ndocker run --rm -p 8088:80 joseluisq/php-fpm:8.2 sh -c \"echo '\u003c?php phpinfo();' \u003e index.php; php -S [::]:80 -t .\"\n# Or\ndocker run --rm -p 8088:80 joseluisq/php-fpm:8.1 sh -c \"echo '\u003c?php phpinfo();' \u003e index.php; php -S [::]:80 -t .\"\n```\n\n[View Docker Compose Examples](#docker-compose-examples)\n\n## Default paths\n\n- Default Docker working directory: `/var/www/html`\n- Additional PHP `.ini` files to load: `/usr/local/etc/php/conf.d`\n- Custom PHP `.ini` file generated (only if `ENV_SUBSTITUTION_ENABLE=true`): `/usr/local/etc/php/conf.d/default-php.ini`\n\n## Configurable Environment Variables\n\n**PHP-FPM** and **PHP** configurations can be overwritten using environment variables.\nTo do so, just indicate the substitution of values using `ENV_SUBSTITUTION_ENABLE=true` (since it is disabled by default).\n\nBelow are the environment variables with their default values:\n\n### PHP-FPM\n\n#### Global FPM\n\nSettings replaced into `/usr/local/etc/php-fpm.conf` file.\n\n- `PHP_FPM_ERROR_LOG=/proc/self/fd/2`\n- `PHP_FPM_LOG_LEVEL=error`\n\n#### FPM WWW Pool\n\nSettings replaced into `/usr/local/etc/php-fpm.d/www.conf` file.\n\n- `PHP_FPM_LISTEN=9000`\n- `PHP_FPM_USER=www-data`\n- `PHP_FPM_GROUP=www-data`\n- `PHP_FPM_LISTEN_OWNER=www-data`\n- `PHP_FPM_LISTEN_GROUP=www-data`\n\n### PHP Config\n\nSettings replaced into `/usr/local/etc/php/conf.d/default-php.ini` file (`php.ini`).\n\n- `PHP_MEMORY_LIMIT=512M`\n- `PHP_EXPOSE_PHP=On`\n- `PHP_SESSION_GC_MAXLIFETIME=1440`\n\n### Disable PHP additional extensions\n\nThe PHP additional extensions can be disabled at startup by providing the `PHP_DISABLE_EXTENSIONS` environment variable with one or more names. For example `PHP_DISABLE_EXTENSIONS=psr,exif,bz2`.\n\nFind the valid extension names in `extensions.txt` file of every PHP version directory or by using `php -m`. For example `docker run --rm joseluisq/php-fpm:8.3 php -m | grep \"exif\"`.\n\n## Docker Compose examples\n\n[docker-compose](https://docs.docker.com/compose/) examples for [Nginx](https://hub.docker.com/_/nginx) and [Apache](https://hub.docker.com/_/httpd) servers can be found under the [./examples](./examples) directory.\n\n### Nginx example\n\n```sh\ndocker-compose -f examples/nginx/docker-compose.yml up\n```\n\n### Apache example\n\n```sh\ndocker-compose -f examples/apache/docker-compose.yml up\n```\n\n## Contributions\n\nUnless 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.\n\nFeel free to send some [pull request](https://github.com/joseluisq/alpine-php-fpm/pulls) or file an [issue](https://github.com/joseluisq/alpine-php-fpm/issues).\n\n## License\n\nThis work is primarily distributed under the terms of both the [MIT license](LICENSE-MIT) and the [Apache License (Version 2.0)](LICENSE-APACHE).\n\n© 2020-present [Jose Quintana](https://joseluisq.net)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Falpine-php-fpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoseluisq%2Falpine-php-fpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Falpine-php-fpm/lists"}