Documentation for the webdevops/* Docker images. It describes the images as they are built from this repository.
| Image | Purpose |
|---|---|
webdevops/php, webdevops/php-dev |
PHP-FPM |
webdevops/php-nginx, webdevops/php-nginx-dev |
PHP-FPM with Nginx |
webdevops/php-apache, webdevops/php-apache-dev |
PHP-FPM with Apache |
webdevops/bootstrap, webdevops/base, webdevops/base-app |
Base images for your own images |
webdevops/toolbox |
Build helper, not meant to run. Stores the baselayout scripts (apt-install, apk-install, docker-image-cleanup, docker-run-bootstrap, generate-locales and more), go-replace and gosu under /baselayout. bootstrap and php copy them from there with COPY --from=webdevops/toolbox. In toolbox itself only go-replace is on the PATH. |
webdevops/dockerfile-build-env |
Build environment for this repository, based on base-app:ubuntu-22.04. The CI builds and tests the images in it, see Building in CI. |
webdevops/nginx, webdevops/apache, the alpine tags of webdevops/bootstrap, webdevops/base and webdevops/base-app, as well as webdevops/storage, webdevops/vsftp and webdevops/ssh are no longer built, and webdevops/php-official is deprecated. Replacing discontinued images shows what to use instead.
-
The images are on Docker Hub for
linux/amd64andlinux/arm64. Docker pulls the one that matches your machine. -
The CI rebuilds all tags every night. The build starts at 00:00 UTC and runs without the build cache, so packages and extensions are installed fresh. A tag such as
8.5therefore points to a new image after every nightly build. -
A new PHP release does not wait for the night: every hour the CI compares the PHP version of the official
phpimages with that ofwebdevops/phpandwebdevops/php-nginx, and starts the build as soon as an official image has a newer PHP. Such a build uses the build cache; a changed base image rebuilds every layer above it. -
To keep an image unchanged, pin it by digest. Docker then uses the digest; the tag in front of it is only for readers:
services: app: image: webdevops/php-nginx:8.5@sha256:<digest>
docker buildx imagetools inspect webdevops/php-nginx:8.5prints the current digest in the lineDigest:. Update the pinned digest regularly, or you miss security updates.
- Environment variables: every setting, with defaults, including uploads and long requests
- Customization: commands, scripts at start and build time, tools for your Dockerfile, services, cron jobs, healthcheck, configuration files, locales, the application user
- PHP images: PHP extensions per tag, Debian or Alpine, production, installing more extensions, mail, Xdebug with an IDE
- Known issues: options that do not work, workarounds, migration from older images
- Replacing discontinued images: what to use instead of
php-official,nginx,apache, thealpinetags of the base images,storage,vsftpandssh
flowchart LR
ubuntu["ubuntu:22.04"] --> bootstrap["webdevops/bootstrap"]
bootstrap --> base["webdevops/base"]
base --> baseapp["webdevops/base-app"]
officialphp["php:VERSION-fpm-bookworm / php:8.6-fpm-trixie / php:VERSION-fpm-alpine"] --> php["webdevops/php"]
php --> phpdev["webdevops/php-dev"]
php --> phpnginx["webdevops/php-nginx"]
php --> phpapache["webdevops/php-apache"]
phpnginx --> phpnginxdev["webdevops/php-nginx-dev"]
phpapache --> phpapachedev["webdevops/php-apache-dev"]
alpine["alpine:latest"] --> toolbox["webdevops/toolbox"]
baseapp --> buildenv["webdevops/dockerfile-build-env"]
toolbox -. "COPY --from" .-> bootstrap
toolbox -. "COPY --from" .-> php