PHP Docker images for development and CI, built on top of php:<version>-cli-alpine.
Published every Monday to ghcr.io/phpyh/php for linux/amd64 and linux/arm64.
| Tag | PHP |
|---|---|
ghcr.io/phpyh/php:8.2 |
8.2 |
ghcr.io/phpyh/php:8.3 |
8.3 |
ghcr.io/phpyh/php:8.4 |
8.4 |
ghcr.io/phpyh/php:8.5 |
8.5 |
makegitunzip
The default user is dev (UID 10001, GID 10001).
The UID and GID can be overridden at build time via --build-arg UID=... --build-arg GID=...
to match the host user and avoid file permission issues with mounted volumes.
opcachexdebug(pre-configured withmode=off,client_host=host.docker.internal, andxdebug.log=/xdebug.log)uv(libuvbindings for async I/O)pcntl(process control: fork, signals, child processes)sockets(low-level socket interface)intl(internationalization via ICU: locales, formatting, collation)bcmath(arbitrary precision arithmetic)pgsql(native PostgreSQL interface)pdo_pgsql(PDO driver for PostgreSQL)
COMPOSER_HOME is set to /composer, and /composer/vendor/bin is added to PATH —
global tools are available as commands without full path. The directory is owned by dev,
so composer global require works without sudo.
Installed as global Composer packages.
- php-cs-fixer, phpyh/coding-standard
- phpstan, phpstan-strict-rules, phpstan-phpunit
- rector
- composer-dependency-analyser
- composer-normalize
- infection
Drop any .ini file into /usr/local/etc/php/conf.d/ — PHP picks it up automatically.
Via a volume mount:
services:
app:
image: ghcr.io/phpyh/php:8.5
volumes:
- ./php.ini:/usr/local/etc/php/conf.d/99-local.iniOr by extending the image:
FROM ghcr.io/phpyh/php:8.5
COPY php.ini /usr/local/etc/php/conf.d/99-local.ini# docker-compose.yml
services:
app:
image: ghcr.io/phpyh/php:8.5
volumes:
- .:/app
- ~/.composer/cache:/composer/cache
working_dir: /appMIT License — see LICENSE for details.