Skip to content

[!!!][TASK] Stop building bootstrap, base, base-app and dockerfile-build-env, and run the CI on the runners - #662

Merged
Kanti merged 1 commit into
task/structure-tests-to-phpunitfrom
task/drop-build-env-and-base-images
Nov 23, 2026
Merged

Kanti merged 1 commit into
task/structure-tests-to-phpunitfrom
task/drop-build-env-and-base-images

Conversation

@Kanti

@Kanti Kanti commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Every image job of .github/workflows/build.yaml ran in container: webdevops/dockerfile-build-env: webdevops/base-app:ubuntu-22.04 plus docker-ce from Docker's apt repository, git and make (and container-structure-test until #661). The GitHub runners have all of that themselves:

  • ubuntu-24.04 (amd64): Docker 28.0.4, Docker Buildx 0.39.0, make 4.3, Git 2.56 (runner image).
  • ubuntu-24.04-arm (arm64): Docker, Docker Buildx, make and Git (partner runner image).

The jobs that already run directly on the runners use exactly these: image-test-runner (checkout, docker/setup-buildx-action, docker/build-push-action, actions/upload-artifact) on both architectures, "Validate Automation" (make generate) and "Check ci/" (make check) on ubuntu-latest. The container cost every image job a pull of about 270 MB (compressed, per architecture) before its first step, 122 jobs per build, and its own build job in every run.

dockerfile-build-env was the only image here that builds on bootstrap, base and base-app. The PHP images build on the official PHP images and bring the same layers themselves (template/Dockerfile/images/{bootstrap,base,baseapp}.twig, provisioning/base, provisioning/base-app). Without it, the three Ubuntu 22.04 images were built, tested and published every night only for users outside this repository, on an Ubuntu release whose standard support ends in April 2027.

What

Builds on #661 (stack: #661 → this); it needs nothing else. It was first stacked on #660, #658 and #657 too. On the rebase onto #661 alone, the docs that this pull request changed in text of those pull requests (the section "Logs", the cron output) came out; whichever of #657, #667 and #658 merges first, this pull request then drops their mentions of bootstrap, base, base-app and Ubuntu on its next rebase. make generate and the checks of ci/ (352 PHPUnit tests, PHPStan) pass.

  • CI on the runners: GithubJobBuilder no longer sets container for the image jobs; .github/workflows/build.yaml regenerated. No step changes:
    • Paths are relative to the checkout (.ci-oci-image/..., .ci-image-test-runner/...), the same in a container and on the runner; the comment of getCiImagePath() explained them with the container and is shortened.
    • Docker, Buildx and the image test runner use the Docker daemon of the runner, as before through the socket that GitHub mounted into the container. make test-image-run mounts /var/run/docker.sock, the socket of the runner.
    • The steps run as the user runner (in the group docker) instead of root of the container. They write only into the checkout (artifacts, the OCI layout, the archive of the test runner) and into the Docker daemon; docker/login-action keeps the login of ghcr.io in the home directory of that user.
  • No longer built: bootstrap, base, base-app and dockerfile-build-env.
    • docker/bootstrap, docker/base, docker/base-app, docker/dockerfile-build-env removed, and with them their 8 jobs (build and publish).
    • conf/provision.yml: the entries base and base-app removed. provisioning/base and provisioning/base-app stay; the entry php maps them into the PHP images.
    • template/Dockerfile/images/{bootstrap,base,baseapp}.twig: the macros ubuntu() removed, which only the removed images used. debian() and alpine() stay for the PHP images.
    • conf/console.yml: autoLatestTag: ~. The tag ubuntu-22.04, published as latest too, was only built for these images; the PHP images have no latest tag. FileReader::autoLatestTag() takes ~ for "no tag" (a missing or empty value is still an error).
    • conf/dockerhub.yml: the four move from built to discontinued, last built in November 2026. Replacement on Docker Hub: webdevops/php:8.5 for base and base-app, ubuntu:22.04 for bootstrap, each with the section of docs/discontinued-images.md; none for dockerfile-build-env, which only this repository used. The page of toolbox says that webdevops/php, not bootstrap, copies its scripts, and that your own images can too. make generate rewrote the Docker Hub pages.
  • Image tests: Images/BootstrapTest.php, BaseTest.php, BaseAppTest.php, DockerfileBuildEnvTest.php, Checks/BuildEnvChecks.php and Checks/CliWithoutApplicationUserChecks.php (only base had no user application) removed. The traits of the layers (BootstrapChecks, BaseChecks, BaseAppChecks, EntrypointChecks, ServiceChecks, ...) stay; the PHP test classes use them, and their comments no longer name the removed images.
    • AdditionalServicesChecks (docker-service install, enable and start) and DnsmasqEnvironmentChecks (VIRTUAL_HOST, SERVICE_DNSMASQ_OPTS, SERVICE_DNSMASQ_USER) only ran in BaseTest. They run in PhpTest now, so these features of the PHP images stay tested. AdditionalServicesChecks tests the services that the image does not run already: in php dnsmasq, postfix and ssh.
  • Docs:
    • docs/discontinued-images.md: a section "webdevops/bootstrap, webdevops/base and webdevops/base-app" (all tags) in place of the one on their alpine tags, and one on webdevops/dockerfile-build-env.
    • docs/images/base.md removed; docs/README.md: the table of images, the Mermaid diagram, the list of discontinued images.
    • docs/customization.md, docs/environment-variables.md, docs/known-issues.md: no more rows and notes for bootstrap, base, base-app and Ubuntu (cli as root in base, the services and locales of base, cron and syslog in base and base-app from [BUGFIX] Send the remaining logs of the services to the container log #657 and [FEATURE] Add cron jobs with CRONJOB_<NAME> variables, without an image build #658, "Debian and Ubuntu" for cron and its output, "all except bootstrap and toolbox" is now "all except toolbox"); a migration note in docs/known-issues.md.
    • CONTRIBUTING.md: the image jobs run on ubuntu-24.04 and ubuntu-24.04-arm, without a container; the baselayout scripts still handle Ubuntu, for your own images. AGENTS.md: the list of discontinued images, and another example of images that differ in what they inherit.

Changes for existing users

  • webdevops/bootstrap, webdevops/base and webdevops/base-app (tags ubuntu-22.04 and latest) get no new builds. Their last images stay on Docker Hub without updates, including security fixes. Pulls on Docker Hub so far: base 345,118, bootstrap 187,476, base-app 95,259.
    • Instead of base or base-app: build on webdevops/php:8.5 (Debian 12) or webdevops/php:8.5-alpine. They have the same entrypoint, supervisord, docker-service, docker-cronjob, docker-run-bootstrap, the user application with /app and the tools of base-app; they also run PHP-FPM, cron and syslog-ng, which docker-service disable switches off. cli runs CLI_SCRIPT as application, not as root as in base.
    • Instead of bootstrap: an official image with the helper scripts copied from webdevops/toolbox (COPY --from=webdevops/toolbox ...), as bootstrap did. toolbox is still built.
  • webdevops/dockerfile-build-env (latest) gets no new builds. Building and testing the images needs Docker, git and make, on your machine or on a GitHub runner.
  • Their Docker Hub pages say so after the merge, through the job "Update the Docker Hub pages".

Tests

How it was verified

  • ci/console generate leaves no change; .github/workflows/build.yaml has 61 image jobs (and their publish jobs), none with a container. The PHPUnit tests of ci/ (352) pass, PHPStan (level 8) and Rector with the configuration of ci/ find nothing.
  • Each step of an image job, with what it needs on the runner: checkout, docker/setup-buildx-action, docker/build-push-action (load: true, OCI export), actions/download-artifact and actions/upload-artifact (as in image-test-runner); docker load, docker push, docker/login-action (Docker); make test-image-run (make, Docker).
Documented statement Check Result
webdevops/php:8.5 and 8.5-alpine have /entrypoint, supervisord, docker-service, docker-cronjob, docker-run-bootstrap, apt-install or apk-install, go-replace, gosu, the user application with /app the example of docs/discontinued-images.md built from both, then command -v, id application, ls -ld /app all there; uid=1000(application) gid=1000(application), /app of application
… and the tools of base-app the image tests of BaseAppChecks (zip, unzip, bzip2, nslookup, ssh, rsync, git, patch; sponge on Debian) pass on both
docker-service disable php-fpm, cron, syslog leave no service running the same example, started supervisorctl status: every program STOPPED Not started; the script in /bootstrap.d ran
cli runs CLI_SCRIPT as application BaseAppChecks::testCliRunsTheCliScriptAsTheApplicationUser passes on both
The helper scripts of bootstrap in an official image the second example, built from ubuntu:22.04 with COPY --from=webdevops/toolbox apt-install rsync installed /usr/bin/rsync, the script in /bootstrap.d ran and was deleted, gosu nobody id -un prints nobody
The runners have Docker, Buildx, git and make the software lists of both runner images, and the jobs that run on them already listed, see Why
  • Not verified: a run of the workflow on GitHub; this pull request's CI is the first. The images of the PHP jobs are built exactly as before; only the place of the steps changes.

…ild-env, and run the CI on the runners

webdevops/dockerfile-build-env was base-app:ubuntu-22.04 with Docker, git and
make, the container in which every image job of the CI ran. The GitHub runners
for amd64 and arm64 have Docker, Buildx, git and make themselves, and the jobs
that run on them already (validation, checks of ci/, image test runner) show
that; the image jobs now run there too and no longer pull the build
environment first.

dockerfile-build-env was the only image here that built on bootstrap, base and
base-app; the PHP images build on the official PHP images and bring the same
layers themselves. So these four images are no longer built. Their last images
stay on Docker Hub without updates; conf/dockerhub.yml lists them as
discontinued, with webdevops/php or an official image plus the helper scripts of
webdevops/toolbox as replacement.

What the PHP images still use stays: provisioning/base and base-app, the
templates of the layers (without their Ubuntu macros) and the traits of the
image tests. The tests of docker-service and dnsmasq, which only BaseTest used,
now run in PhpTest. conf/console.yml sets no tag as latest any more
(autoLatestTag: ~).
@Kanti
Kanti force-pushed the task/drop-build-env-and-base-images branch from 25cc2f4 to 5b2d521 Compare November 23, 2026 08:31
@sonarqubecloud

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review November 23, 2026 09:11
@Kanti
Kanti merged commit cf53555 into master Nov 23, 2026
190 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant