Images
The Alpine foundation every other image builds on, with tini, Supervisor and the shared logging helpers.

adamrollogi/base:latest is a small Alpine image with the tooling the PHP images share. You can use it directly for sidecars or cron containers, but most people will only ever see it as the parent of php.

What is inside

ComponentNotes
Alpine 3.24Digest-pinned base, upgraded with apk upgrade at build time so Alpine security fixes are always current. Supported by Alpine until June 2028.
tiniPID 1 for correct signal handling and zombie reaping.
Supervisor 4.3Process manager used in root mode. Runs crond and, in the web images, Nginx and PHP-FPM.
bash, curl, wget, git, nano, opensslEveryday tooling.
gettext-envsubstRenders the configuration templates from environment variables at startup.
gcompatglibc compatibility shim for binaries that need it.
ca-certificates, tzdataUp to date trust store and timezone data. TZ defaults to UTC.
Python 3.14Present only because Supervisor needs it. setuptools is upgraded past Alpine's package to clear a known CVE.

The appuser account (UID 1000, GID 1000) is created here and is the default user for every image.

Process model

The entrypoint is tini -- bash, and the default command is bash, so docker run adamrollogi/base drops you into a shell. Run supervisord -c /etc/supervisord.conf as root to get the Supervisor and cron setup the web images use.

Supervisor itself logs to the container's stderr. Cron runs through run-service, which tags its output [cron].

Logging helpers

Two small scripts live in /usr/local/bin and are used by every descendant image.

ScriptPurpose
run-service <name> <command>Starts a process with its stdout and stderr tagged [name], or wrapped as JSON when LOG_FORMAT=json. Lines that are already JSON pass through untouched.
container-logs [-f] [service|all]In LOG_MODE=file, tails the per-service log files. In the default stdout mode, prints the docker logs filtering recipes.

The shared shell helpers (log, json_escape, apply_ini_overrides) are in /usr/local/lib/entrypoint-lib.sh and are sourced by the PHP entrypoints. See Logging.

Environment variables

VariableDefaultDescription
LOG_MODEstdoutstdout streams everything to the container, tagged per service. file writes one file per service under /var/log.
LOG_FORMATtexttext for tagged lines, json for one JSON object per line.
LOG_TAGtruefalse removes the [service] prefixes in text mode.
LANGC.UTF-8Locale.
TZUTCTimezone, applied to /etc/localtime at build.

Hardening

  • No setuid or setgid binaries. The busybox-suid package is not installed and the setuid bits that shadow would add are stripped.
  • Configuration under /etc is root-owned. Runtime config in the PHP images is rendered into /run.
  • OCI labels (title, description, source, licenses) are set on the image.

Layout

PathPurpose
/etc/supervisord.confSupervisor main config. Includes /etc/supervisord.d/*.conf.
/usr/local/bin/run-servicePer-service log tagging wrapper.
/usr/local/bin/container-logsLog tailing helper for file mode.
/usr/local/lib/entrypoint-lib.shShared shell functions for entrypoints.
/appDefault working directory, owned by appuser.