Getting Started

Introduction

What these images are, how they relate to each other, and which PHP versions they cover.

These are production-oriented PHP container images built on Alpine Linux and published to Docker Hub under adamrollogi/. They are built for linux/amd64 and linux/arm64, so the same tag runs on Intel servers, Graviton instances and Apple Silicon laptops.

The design goals are simple:

  • Predictable. The exact PHP release in every tag is pinned and verified at build time. A tag never silently changes its PHP version underneath you.
  • Secure by default. Containers run as an unprivileged user, carry no setuid binaries, keep their configuration root-owned, and are scanned before any tag is published.
  • Configurable without rebuilding. Everything from memory_limit to TLS ciphers is an environment variable, and any php.ini or PHP-FPM setting can be set directly.
  • Observable. Every log line is tagged with the service that wrote it, with a JSON mode for log shippers.

Image hierarchy

alpine:3.24
  └── adamrollogi/base            tini, Supervisor, bash, curl, git, logging helpers
        └── adamrollogi/php       PHP CLI, Composer, extensions
              └── adamrollogi/php-nginx      Nginx, PHP-FPM, HTTPS, health endpoint
                    └── adamrollogi/php-nginx-dev   Xdebug, dev defaults

Each image inherits everything from its parent, including environment variables, entrypoint behaviour and the logging layout, so a setting you learn on one image works the same on the others.

Supported PHP versions

MinorStatusSource
8.2SupportedAlpine edge testing
8.3SupportedAlpine edge community
8.4SupportedAlpine edge community
8.5SupportedAlpine edge community
8.6Pre-release, experimentalAlpine edge testing

PHP 8.6 is published while it is still a release candidate. Treat it as a preview until 8.6.0 ships; its exact tag follows Alpine's spelling, for example 8.6.0_rc3. See Tags and versions for how tags are named and how new releases arrive.

What is inside

base

Alpine 3.24, tini, Supervisor with cron, bash, curl, git, gcompat, and the run-service and container-logs helpers.

php

PHP CLI and Composer with bcmath, curl, gd, intl, imagick, mbstring, mysqli, opcache, pdo_mysql, redis, soap, zip and more.

php-nginx

Nginx 1.30 and PHP-FPM with security headers, hidden-file denial, optional HTTPS and a /health endpoint.

php-nginx-dev

Xdebug 3.5 configured for host.docker.internal, errors on screen, and static assets served with no-store.

Licence

MIT. The source, Dockerfiles and this documentation live at github.com/AdamRollinson/docker.