Skip to content

feat: add v2026.1 image variant (ADR 2026-07-08) - #231

Draft
Soner (shyim) wants to merge 7 commits into
mainfrom
feat/image-variant-v2026.1
Draft

feat: add v2026.1 image variant (ADR 2026-07-08)#231
Soner (shyim) wants to merge 7 commits into
mainfrom
feat/image-variant-v2026.1

Conversation

@shyim

Copy link
Copy Markdown
Member

What

First iteration of the Docker Image Variant v2 ADR (#150), published alongside the existing v1 images — nothing in the v1 build chain changes (root docker-bake.hcl is untouched).

New images

Image Tags
Base ghcr.io/shopware/docker-base:<php>-frankenphp-v2026.1 (+ Docker Hub)
Dev ghcr.io/shopware/docker-dev:<php>-node<22|24>-v2026.1

Layout

One directory per calendar version: v2026.1/ contains the frankenphp and dev build contexts and its own docker-bake.hcl, built by a workflow scoped to that directory (build-v2026.1.yml). The shared build-bake-publish action gained a files input (defaults to the root bake file, v1 workflows unaffected).

Note: buildx bake resolves relative context paths against the working directory, not the bake file — the version bake file therefore uses repo-root-relative paths and must be invoked from the repo root (which is what the workflow does).

ADR items implemented

  • Debian/FrankenPHP only — single production variant, based on dunglas/frankenphp pinned by digest (frankenphpDigestMatrix, refreshed by update-php-matrix.mjs)
  • Everything pinnedinstall-php-extensions 2.11.12, redis-6.3.0, apcu-5.1.28, amqp-2.2.0, zstd-0.18.0, grpc-1.83.0, opentelemetry-1.2.1, xdebug-3.5.3; all pins live as bake variables (single source of truth for prod + dev). No more amqp git pin / grpc patch stack — plain PECL builds on Debian
  • grpc + otel installed but not loaded — inis live outside the scan dir; the entrypoint appends them to PHP_INI_SCAN_DIR when PHP_EXTENSION_GRPC=1 / PHP_EXTENSION_OPENTELEMETRY=1 (no fs writes, read-only rootfs safe)
  • No app-level env bakedAPP_ENV, LOCK_DSN, MAILER_DSN, SHOPWARE_*, INSTALL_* removed; only PHP_* / COMPOSER_* infrastructure defaults remain
  • Lifecycle — dates baked as SHOPWARE_IMAGE_{VERSION,SECURITY_ONLY,EOL} env + com.shopware.image.* labels; shopware-image-lifecycle prints escalating startup warnings (notice → prominent ≤90d → loud past EOL), suppressible via SHOPWARE_DOCKER_SUPPRESS_EOL_WARNING=1; best-effort ONBUILD build-time check. Strictly warn-only
  • Supply chain — SBOM + provenance=mode=max attestations, OCI source/revision/version/created labels, HEALTHCHECK via the Caddy admin endpoint
  • Dev image on top of the v2 base — Node 22/24 (glibc), no supervisord (FrankenPHP serves directly), profilers shipped disabled, enabled via PHP_PROFILER=<name>; uid 1000 as in v1 dev (base image keeps uid/gid 82 for v1 parity)

CI

build-v2026.1.yml builds both targets and asserts the contract: optional extensions absent by default / loadable via env, no app env baked, uid/gid 82, dev container-structure tests (18 tests). The security scan matrix includes the new variant.

Verified locally (arm64, PHP 8.4)

  • Both images build; extension toggles, profiler toggle chain, EOL warning escalation/suppression, healthcheck (healthy), and all structure tests pass
  • update-php-matrix.mjs round-trips idempotently and auto-discovers v*/docker-bake.hcl files (future v2027.1/ needs no script change)

Deliberately out of scope (follow-ups per ADR migration outline)

  • Rolling tags keep pointing at v1; no v1 deprecation notice yet (ships as its own announced change)
  • cosign signing, migration guide, EOL dates in README (marked "not scheduled" until GA is decided)

🤖 Generated with Claude Code

Soner (shyim) and others added 7 commits August 24, 2026 08:59
Implements the first iteration of the Docker Image Variant v2 ADR
alongside the existing v1 images:

- Debian-based FrankenPHP production image, base pinned by digest,
  extension installer and all PECL extensions pinned to exact versions
- grpc and opentelemetry shipped but not loaded; enabled at runtime via
  PHP_EXTENSION_GRPC=1 / PHP_EXTENSION_OPENTELEMETRY=1 (PHP_INI_SCAN_DIR,
  works on read-only rootfs)
- No Shopware application env baked into the image; only PHP_*/COMPOSER_*
  infrastructure defaults remain
- Lifecycle dates baked as env + OCI labels with escalating startup
  warnings (warn-only), best-effort ONBUILD build-time check
- HEALTHCHECK via Caddy admin endpoint, SBOM + provenance attestations
- Dev image on top of FrankenPHP (Node 22/24, no supervisord), profilers
  shipped disabled and enabled via PHP_PROFILER
- Per-version layout: v2026.1/ holds contexts and its own docker-bake.hcl;
  build workflow scoped to that directory
- update-php-matrix.mjs refreshes digest pins in all v*/docker-bake.hcl

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the custom build-bake-publish composite action (Namespace-powered
buildx) with Docker's official reusable bake workflow for the v2026.1 images:

- native arm64 runners (ubuntu-24.04-arm) instead of QEMU/remote builders
- signed SLSA provenance + SBOM attestations (keyless, GitHub OIDC) —
  covers the cosign item from the ADR
- one reusable-workflow call per bake target: a prepare job derives the
  PHP/Node matrices from the bake definition via 'bake --print', so the
  bake file stays the single source of truth
- tags move to meta-images/meta-tags inputs in CI (github-builder replaces
  bake-defined tags); the tags in the bake file now apply to local builds only
- v1 workflows keep using the composite action unchanged

Pinned to a main commit — docker/github-builder has no release tag yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pinned docker/dockerfile:1.7 frontend (2024) does not know the
source.git.checksum capability that docker/github-builder's git-context
builds pass, making every CI build fail with:

  failed to resolve dockerfile: unknown API capability source.git.checksum

The floating :1 tag resolves to the latest stable frontend, which
supports it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Addresses the supply-chain concern of the floating docker/dockerfile:1
tag: the frontend is now pinned by manifest digest like the base images,
and update-php-matrix.mjs refreshes the pin in every versioned directory.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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