{"id":27161010,"url":"https://github.com/flownative/docker-php","last_synced_at":"2026-02-19T09:29:31.895Z","repository":{"id":37854953,"uuid":"240472534","full_name":"flownative/docker-php","owner":"flownative","description":"Docker image providing PHP CLI and PHP-FPM with various extensions pre-installed","archived":false,"fork":false,"pushed_at":"2026-02-11T10:57:05.000Z","size":1878,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-11T19:14:47.968Z","etag":null,"topics":["debian","docker-image","flownative-beach","php","php-fpm"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flownative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["robertlemke","kdambekalns"]}},"created_at":"2020-02-14T09:30:10.000Z","updated_at":"2026-02-11T10:54:59.000Z","dependencies_parsed_at":"2026-01-17T11:08:48.369Z","dependency_job_id":null,"html_url":"https://github.com/flownative/docker-php","commit_stats":null,"previous_names":[],"tags_count":161,"template":false,"template_full_name":null,"purl":"pkg:github/flownative/docker-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Fdocker-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Fdocker-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Fdocker-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Fdocker-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flownative","download_url":"https://codeload.github.com/flownative/docker-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Fdocker-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29609524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["debian","docker-image","flownative-beach","php","php-fpm"],"created_at":"2025-04-09T00:08:38.462Z","updated_at":"2026-02-19T09:29:31.865Z","avatar_url":"https://github.com/flownative.png","language":"Shell","funding_links":["https://github.com/sponsors/robertlemke","https://github.com/sponsors/kdambekalns"],"categories":[],"sub_categories":[],"readme":"# Docker PHP image\n\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![Maintenance level: Love](https://img.shields.io/badge/maintenance-%E2%99%A1%E2%99%A1%E2%99%A1-ff69b4.svg)](https://www.flownative.com/en/products/open-source.html)\n![](https://github.com/flownative/docker-beach-php/workflows/Build%20Docker%20Image/badge.svg)\n![](https://github.com/flownative/docker-beach-php/workflows/Daily%20Releases/badge.svg)\n\nA Docker image providing [PHP-FPM](https://www.php.net/). Compared to\nother PHP images, this one is tailored to run without root privileges.\nAll processes use an unprivileged user (uid 1000). And much work has\nbeen put into providing proper console output and meaningful messages.\n\n## tl;dr\n\n```bash\n$ docker run flownative/php\n```\n\n![Screenshot with example log output](docs/php-log-example.png\n\"Example log output\")\n\n## Example usage\n\nHere's an example of a Docker Compose configuration using this image as\na PHP-FPM container. The configuration should give you an idea of how to\nintegrate the image, but you'll certainly need to provide more code in\norder to get it running with your specific application.\n\nFor a full-working solution tailored to Neos CMS and Neos Flow, please\nhave a look at [Local Beach](https://flownative.com/localbeach) instead.\n\n```yaml\nvolumes:\n  application:\n    name: app\n    driver: local\n\nservices:\n  webserver:\n    image: flownative/nginx:4\n    ports:\n      - \"8080\"\n    volumes:\n      - application:/application\n    environment:\n      - NGINX_PHP_FPM_HOST=app_php.local_beach\n\n  php:\n    image: flownative/php:8.5\n    volumes:\n      - application:/application\n    environment:\n\n```\n\n## Configuration\n\n### Logging\n\nBy default, the PHP logs are written to STDOUT / STDERR. That way, you\ncan follow logs by watching container logs with `docker logs` or using a\nsimilar mechanism in Kubernetes or your actual platform.\n\n### Environment variables\n\n| Variable Name                   | Type    | Default                                | Description                                                                                                                                         |\n|---------------------------------|---------|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| PHP_BASE_PATH                   | string  | /opt/flownative/php                    | Base path for PHP (read-only)                                                                                                                       |\n| PHP_DATE_TIMEZONE               | string  | UTC                                    | Default timezone ([doc](https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone))                                                |\n| PHP_ERROR_REPORTING             | string  | 2147483647                             | PHP error reporting log levels ([doc](https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting))                               |\n| PHP_DISPLAY_ERRORS              | string  | off                                    | Display PHP errors ([doc](https://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors))                                            |\n| PHP_ERROR_LOG                   | string  | /dev/stderr                            | Path leading to the file where PHP errors should be logged                                                                                          |\n| PHP_FPM_ERROR_LOG_PATH          | string  | /opt/flownative/log/php-fpm-error.log  | Path leading to the file where PHP-FPM errors should be logged                                                                                      |\n| PHP_FPM_ACCESS_LOG_PATH         | string  | /opt/flownative/log/php-fpm-access.log | Path leading to the file where PHP-FPM access should be logged                                                                                      |\n| PHP_MEMORY_LIMIT                | string  | 750M                                   | PHP memory limit ([doc](https://www.php.net/manual/en/ini.core.php#ini.memory-limit))                                                               |\n| PHP_OPCACHE_PRELOAD             | string  |                                        | Path and filename of a preload script ([doc](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.preload))                          |\n| PHP_XDEBUG_ENABLE               | boolean | false                                  | Enable or disable the Xdebug extension                                                                                                              |\n| PHP_XDEBUG_MODE                 | string  | develop                                | Controls which Xdebug features are enabled, for example \"develop\" or \"debug\". See Xdebug manual for details                                         |\n| PHP_XDEBUG_CONFIG               | string  |                                        | Values assigned to this variable are propagated as XDEBUG_CONFIG. See Xdebug manual for details                                                     |\n| PHP_XDEBUG_DISCOVER_CLIENT_HOST | boolean | false                                  | If enabled, Xdebug will first try to connect to the client that made the HTTP request. See Xdebug manual for details                                |\n| PHP_XDEBUG_CLIENT_HOST          | string  |                                        | Configures the IP address or hostname where Xdebug will attempt to connect to when initiating a debugging connection. See Xdebug manual for details |\n| PHP_XDEBUG_MAX_NESTING_LEVEL    | integer | 512                                    | Controls the protection mechanism for infinite recursion protection. See Xdebug manual for details                                                  |\n| PHP_IGBINARY_ENABLE             | boolean | false                                  | Enable or disable the igbinary extension                                                                                                            |\n| PHP_EXCIMER_ENABLE              | boolean | false                                  | Enable or disable the Excimer extension                                                                                                             |\n| PHP_FPM_USER                    | string  | 1000                                   | User id for running PHP (read-only)                                                                                                                 |\n| PHP_FPM_GROUP                   | string  | 1000                                   | Group id for running PHP (read-only)                                                                                                                |\n| PHP_FPM_PORT                    | string  | 9000                                   | Port the PHP-FPM process listens to                                                                                                                 |\n| PHP_FPM_MAX_CHILDREN            | string  | 20                                     | Maximum number of children to run                                                                                                                   |\n| PHP_FPM_PM_MODE                 | string  | ondemand                               | Process manager mode for PHP-FPM; \"static\", \"ondemand\" or \"dynamic\"                                                                                 |\n| PHP_SPX_ENABLE                  | boolean | false                                  | Enable or disable the SPX extension                                                                                                                 |\n| PHP_SPX_KEY                     | string  | dev                                    | The secret key used for authentication                                                                                                              |\n| PHP_SPX_IP_WHITELIST            | string  |                                        | The IP address white list used for authentication as a comma separated list of IP addresses†                                                        |\n| PHP_SPX_IP_VAR                  | string  | REMOTE_ADDR                            | The $_SERVER key holding the client IP address used for authentication                                                                              |\n| PHP_SPX_TRUSTED_PROXIES         | string  | 127.0.0.1                              | The trusted proxy list as a comma separated list of IP addresses†, ingored when `PHP_SPX_IP_VAR`is `REMOTE_ADDR`                                    |\n|                                 |         |                                        |                                                                                                                                                     |\n\n† – `*` (match all) and subnet masks (e.g. `192.168.1.0/24`) are supported.\n\n## Security aspects\n\nThis image is designed to run as a non-root container. Using an\nunprivileged user generally improves the security of an image, but may\nhave a few side-effects, especially when you try to debug something by\nlogging in to the container using `docker exec`.\n\nWhen you are running this image with Docker or in a Kubernetes context,\nyou can take advantage of the non-root approach by disallowing privilege\nescalation:\n\n```yaml\n$ docker run flownative/php:8.5 --security-opt=no-new-privileges\n```\n\nWhen you exec into this container running bash, you will notice your\nprompt claiming \"I have no name!\". That's nothing to worry about: The\ncontainer runs as a user with uid 1000, but in fact that user does not\neven exist.\n\n```\n$ docker run -ti --name php --rm flownative/php:8.5 bash\nI have no name!@5a0adf17e426:/$ whoami\nwhoami: cannot find name for user ID 1000\n```\n\n## Building this image\n\nBuild this image with `docker build`. You need to specify the desired\nversion for some of the tools as build arguments:\n\n```bash\ndocker build \\\n    --build-arg PHP_VERSION=8.5.0 \\\n    -t flownative/php:latest .\n```\n\nCheck the latest stable release on [php.net](https://www.php.net).\n\n## Maintenance\n\nThe Flownative images are built through Github Workflows. A new release\nbuild is triggered whenever a new Git tag is pushed to this repository.\nAs usual, the tag must follow the syntax \"v1.2.3+4\". Note that the tag\nis used for the code of this repository and has nothing to do with an\nactual PHP version.\n\n### New PHP versions\n\nIn order to produce images for a new PHP version, update the\n`PHP_VERSION` constants found in `.github/workflows/docker.build.yaml`,\ncommit the result and push it along with a new tag. Note that, because\nyou did not fix a bug or add a feature of the actual image code, you\nshould only raise the build version number (ie. v1.2.0+1 becomes\nv1.2.0+2). The Github workflow will build images for all supported PHP\nbranches, tag them and push them to the container registries at Github,\nGoogle and Docker Hub.\n\n### Nightly builds\n\nEach night, the images for the most recent version of each branch will\nbe rebuilt using the latest Flownative base image (`flownative/base`).\n\n### Trigger\n\nWhenever new images were built, a custom event is triggered which in\nturn triggers builds of the `flownative/beach-php` image, which is\nderived from this one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflownative%2Fdocker-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflownative%2Fdocker-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflownative%2Fdocker-php/lists"}