{"id":15457550,"url":"https://github.com/stayallive/php","last_synced_at":"2025-04-15T05:55:00.909Z","repository":{"id":44957797,"uuid":"75718085","full_name":"stayallive/php","owner":"stayallive","description":"Complete PHP docker images for continuous integration.","archived":false,"fork":false,"pushed_at":"2025-04-01T20:20:35.000Z","size":404,"stargazers_count":25,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T05:54:56.039Z","etag":null,"topics":["ci","docker","docker-image","php"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stayallive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"stayallive"}},"created_at":"2016-12-06T09:54:51.000Z","updated_at":"2025-04-01T20:20:38.000Z","dependencies_parsed_at":"2023-12-18T13:53:29.928Z","dependency_job_id":"98480c3b-63ab-4320-9cc2-b42727868a08","html_url":"https://github.com/stayallive/php","commit_stats":{"total_commits":326,"total_committers":5,"mean_commits":65.2,"dds":0.6319018404907976,"last_synced_commit":"9d8650fb7f6439b2c3f818918181726687858e8b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Fphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Fphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Fphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stayallive%2Fphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stayallive","download_url":"https://codeload.github.com/stayallive/php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016320,"owners_count":21198832,"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":["ci","docker","docker-image","php"],"created_at":"2024-10-01T22:47:14.116Z","updated_at":"2025-04-15T05:55:00.903Z","avatar_url":"https://github.com/stayallive.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/stayallive"],"categories":[],"sub_categories":[],"readme":"# CI PHP Docker images\n\nPHP Docker images for continuous integration and running tests. These images were created for using with Gitlab CI but should work on other platforms too.\n\nThese images are built with the [official PHP Docker images](https://registry.hub.docker.com/_/php/) as their base.\n\n_This repository started as a fork of [TetraWeb/docker](https://github.com/TetraWeb/docker), huge thanks to them for the initial work._\n\n## Features\n\n- [Most extensions](#available-extensions) are compiled and ready for loading with `docker-php-ext-enable`\n- Git client from official debian repo\n- Latest binaries of Composer, PHPUnit and PHP Code Sniffer (`phpcs` and `phpcbf`)\n- Node.js v12, v14 or v20 by default using the [`n`](https://github.com/tj/n) Node version manager, with `npm`, `yarn` and `n` pre-installed\n- sendmail command via msmtp, configured as relay to localhost. Check `/etc/msmtprc` to setup relay server\n\n## Image Registries\n\nImages are available on the following registries:\n\n- [GitHub Container Registry](https://github.com/stayallive/php/pkgs/container/php) (pull using `ghcr.io/stayallive/php:8.4`)\n- [GitLab Container Registry](https://gitlab.com/stayallive/php/container_registry/3036570) (pull using `registry.gitlab.com/stayallive/php:8.4`)\n- [Docker Hub](https://hub.docker.com/r/stayallive/php) (pull using `stayallive/php:8.4`)\n\nThey are listed as `stayallive/php` and tagged by PHP version for both `linux/amd64` \u0026 `linux/arm64`.\n\n[![Built with Depot](https://depot.dev/badges/built-with-depot.svg)](https://depot.dev/?utm_source=stayallive)\n\n## PHP versions\n\n- [`stayallive/php:8.4` (*8.4.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/8.4.Dockerfile) (Node LTS)\n- [`stayallive/php:8.3` (*8.3.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/8.3.Dockerfile) (Node 20 \u0026 LTS)\n- [`stayallive/php:8.2` (*8.2.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/8.2.Dockerfile) (Node 14 \u0026 LTS)\n- [`stayallive/php:8.1` (*8.1.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/8.1.Dockerfile) (Node 14 \u0026 LTS)\n- [`stayallive/php:8.0` (*8.0.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/8.0.Dockerfile) (Node 14 \u0026 LTS)\n- [`stayallive/php:7.4` (*7.4.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/7.4.Dockerfile) (Node 14, no longer being built)\n- [`stayallive/php:7.3` (*7.3.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/7.3.Dockerfile) (Node 12, no longer being built)\n- [`stayallive/php:7.2` (*7.2.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/7.2.Dockerfile) (Node 12, no longer being built)\n- [`stayallive/php:7.1` (*7.1.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/7.1.Dockerfile) (Node 12, no longer being built)\n- [`stayallive/php:7.0` (*7.0.Dockerfile*)](https://github.com/stayallive/php-docker/blob/master/7.0.Dockerfile) (Node 12, no longer being built)\n\n_Keep in mind that although there might be a tag available it doesn't mean the PHP version is still supported, see [supported PHP versions](https://www.php.net/supported-versions.php) for more information._\n\n## Node versions\n\nStarting with the PHP 8 images the [`n`](https://github.com/tj/n) Node version manager is installed.\n\nPre-cached is Node `14`/`20` and `LTS` with `14`/`20` set as the default (see PHP versions list which Node version is the default). To use the `LTS` version run `n lts` in for example your `.gitlab-ci.yml` `before_script` section:\n\n```yaml\nbefore_script:\n  - n lts\n```\n\nNote: Starting with PHP 8.4 only the LTS version of Node is pre-cached.\n\nYou can use `n` to install any other Node version you need, but they will be downloaded each run and will not be pre-cached inside the image.\n\n## Available extensions\n\nSome extensions are enabled by default (compiled-in) and some you have to enable when needed.\n\nYou can enable extensions by adding the environment variable `WITH_EXTENSIONS` with a space separated list of extensions you want to enable.\n\n```bash\nWITH_EXTENSIONS=imagick redis\n```\n\nAlternatively you can enable the extensions by calling `docker-php-ext-enable` in for example your `.gitlab-ci.yml` `before_script` section:\n\n```yaml\nbefore_script:\n  # We enable bcmath, gd and intl here for example but you\n  # can enable any extension or PECL extension listed below\n  - docker-php-ext-enable bcmath gd intl\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eAvailable extensions\u003c/summary\u003e\n\n- amqp\n- apcu\n- ast\n- bcmath\n- bitset\n- brotli\n- bz2\n- calendar\n- cassandra\n- csv\n- dba\n- ddtrace\n- decimal\n- ds\n- enchant\n- ev\n- event\n- excimer\n- exif\n- ffi\n- ftp\n- gd\n- gearman\n- gettext\n- gmagick\n- gmp\n- gnupg\n- grpc\n- http\n- igbinary\n- imagick\n- imap\n- inotify\n- intl\n- json_post\n- jsonpath\n- ldap\n- luasandbox\n- lz4\n- lzf\n- mailparse\n- maxminddb\n- md4c\n- memcache\n- memcached\n- memprof\n- mongodb\n- msgpack\n- mysqli\n- oauth\n- oci8\n- odbc\n- opcache\n- opentelemetry\n- parallel\n- parle\n- pcntl\n- pcov\n- pdo_dblib\n- pdo_firebird\n- pdo_mysql\n- pdo_oci\n- pdo_odbc\n- pdo_pgsql\n- pdo_sqlsrv\n- pgsql\n- php_trie\n- pkcs11\n- pq\n- protobuf\n- pspell\n- psr\n- raphf\n- rdkafka\n- redis\n- relay\n- saxon\n- seasclick\n- shmop\n- simdjson\n- smbclient\n- snappy\n- snmp\n- soap\n- sockets\n- solr\n- spx\n- sqlsrv\n- ssh2\n- stomp\n- sync\n- sysvmsg\n- sysvsem\n- sysvshm\n- tideways\n- tidy\n- timezonedb\n- uploadprogress\n- uuid\n- uv\n- vips\n- wikidiff2\n- xdebug\n- xdiff\n- xhprof\n- xlswriter\n- xmldiff\n- xmlrpc\n- xpass\n- xsl\n- yac\n- yaml\n- yar\n- zephir_parser\n- zip\n- zmq\n- zookeeper\n- zstd\n\n\u003c/details\u003e\n\n## Environment variables\n\n### `WITH_XDEBUG=1`\n\nEnables xdebug extension (disabled by default)\n\n### `WITH_EXTENSIONS=imagick redis`\n\nEnable extensions, separated by space\n\n### `TIMEZONE=Europe/Amsterdam`\n\nSet system and `php.ini` timezone. You can also set timezone in .gitlab-ci.yml - check [Example](https://github.com/TetraWeb/docker/blob/master/examples/purephp/.gitlab-ci.yml)\n\n### `COMPOSER_GITHUB=\u003cYOUR_GITHUB_TOKEN\u003e`\n\nAdds GitHub OAuth token for Composer which allows composer to get unlimited repositories from GitHub without blocking non-interactive mode with request for authorization.\n\nYou can obtain your token at [https://github.com/settings/tokens](https://github.com/settings/tokens) (no scopes are required).\n\nSee: [Composer documentation about GitHub API rate limits](https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth)\n\n## Custom `php.ini` values\n\nEasiest way is to add your php.ini directives to `/usr/local/etc/php/conf.d/[anyname].ini`.\n\nAnother way is to mount your local php.ini on container start like `docker run ... -v /home/user/php.ini:/usr/local/php/etc/php.ini ...`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstayallive%2Fphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstayallive%2Fphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstayallive%2Fphp/lists"}