Skip to content

ci: GHA layer cache + refresh stale container bases (#57)#62

Merged
sam-at-luther merged 2 commits into
mainfrom
fix/docker-cache-and-base-image-refresh
May 23, 2026
Merged

ci: GHA layer cache + refresh stale container bases (#57)#62
sam-at-luther merged 2 commits into
mainfrom
fix/docker-cache-and-base-image-refresh

Conversation

@sam-at-luther
Copy link
Copy Markdown
Member

Summary

  • Adds --cache-from/--cache-to type=gha,mode=max to the shared build-docker-images action so the 18-job buildx matrix reuses layers. Cache scoped per image+arch.
  • Refreshes the bases flagged in Address remaining container base-image debt after Alpine CVE refresh #57 to currently supported upstream tags: ubuntu 22.04 → 24.04, node bullseye → bookworm (with python2 → python3 for node-gyp), maven:3.8.5-openjdk-8maven:3.9-eclipse-temurin-17 for build-java + build-swaggercodegen, openjdk:19-jdk-alpine3.16eclipse-temurin:17-jre-jammy for the Java runtime (jammy not alpine — Temurin's 17-jre-alpine is amd64-only and would break arm64), python:3.8-alpine3.20python:3.12-alpine for the build-godynamic AWS builder stage.
  • Replaces the historical luthersystems/nginx-frontend:v0.0.88 hard-pin in Dockerfile.build-js.static with an ARG NGINX_FRONTEND_VERSION defaulting to latest, overridable via build-js.mk.
  • Aligns stale ARG ALPINE_VERSION=3.22 defaults to 3.23 in the two .static Dockerfiles to match common.config.mk.

Multi-arch (amd64 + arm64) confirmed on every new base tag before commit.

Test plan

  • CI matrix: 9 images × 2 arches build green on first run
  • CI matrix: second run shows GHA cache hits in buildx logs (importing cache manifest from gha)
  • Tag release: publish.yml pushes the refreshed images to Docker Hub successfully
  • Downstream smoke: pick one Go, one Java, one JS consumer repo and rebuild against the new buildenv tag (acceptance criterion from Address remaining container base-image debt after Alpine CVE refresh #57)
  • Trivy/Snyk vuln scan diff on build-go-alpine, service-base-alpine, build-js, build-java, build-java.static, build-godynamic before vs after

Out of scope (#57 leftovers)

Review notes

  • /review findings: P0 (eclipse-temurin:17-jre-alpine arm64 gap) resolved; no P1; P2/P3 left as noted (rolling maven tag; branch-scoped cache key).
  • qa-professor: no test files changed (this repo has no test suite).

Related

@sam-at-luther sam-at-luther force-pushed the fix/docker-cache-and-base-image-refresh branch from e4aa72c to bb04c54 Compare May 23, 2026 15:15
Wire `--cache-from`/`--cache-to type=gha,mode=max` into the shared
`build-docker-images` composite action so the 18-job buildx matrix
(9 images x 2 arches) reuses unchanged layers across runs. Cache is
scoped per `image-arch` to avoid cross-contamination.

`crazy-max/ghaction-github-runtime` (SHA-pinned, dependabot-tracked)
exports `ACTIONS_CACHE_URL` / `ACTIONS_RUNTIME_TOKEN` so buildx can
talk to the GHA cache backend. The Makefile accepts the flags via a
`BUILDX_CACHE_FLAGS` variable that stays empty for local builds.
@sam-at-luther sam-at-luther force-pushed the fix/docker-cache-and-base-image-refresh branch 2 times, most recently from 70a4b1a to f3c7a01 Compare May 23, 2026 15:23
Bumps the bases flagged in #57 to currently supported upstream tags.
All new bases are confirmed multi-arch (linux/amd64 + linux/arm64).

- build-js: ubuntu:22.04 -> ubuntu:24.04 (LTS); node:bullseye -> node:bookworm.
  Bookworm drops the python2 package, so the node-gyp toolchain install
  switches to python3/python3-dev (node-gyp >=9 targets python3).
- build-java, build-swaggercodegen: maven:3.8.5-openjdk-8 ->
  maven:3.9-eclipse-temurin-17. openjdk:* on Docker Hub is deprecated;
  Eclipse Temurin is the recommended successor. JDK 17 (LTS) is the
  conservative bump from 8.
- build-java.static: openjdk:19-jdk-alpine3.16 ->
  eclipse-temurin:17-jre-jammy. The -jre-alpine variant is amd64-only
  on Temurin 17, so we use the Ubuntu (jammy) base for arm64 support;
  the apk-based package install becomes apt with explicit upgrade.
- build-godynamic AWS stage: python:3.8-alpine3.20 -> python:3.11-alpine,
  plus AWSCLI_VER 2.25.5 -> 2.34.53. The bump is required because
  awscli 2.25.5 pinned ruamel.yaml.clib<=0.2.8, whose C extension
  fails to compile against the libyaml shipped in newer Alpine
  (signature mismatch with current yaml_parser_set_input).
  awscli 2.34.53 allows ruamel.yaml.clib<=0.2.15, which builds cleanly.
  Staying on Python 3.11 (not 3.12) because awscli's make-exe script
  still imports distutils.dir_util.copy_tree, removed in 3.12 (PEP 632).
- build-js.static: replace the historical `luthersystems/nginx-frontend:v0.0.88`
  hard-pin with `ARG NGINX_FRONTEND_VERSION` (defaults to `latest`,
  overridable from build-js.mk). Ties the runtime base to a real
  buildenv release tag instead of a frozen 2022-era SHA.
- build-go.static, build-godynamic.static: align stale ARG ALPINE_VERSION
  defaults from 3.22 to 3.23 (matches common.config.mk).

Out of scope: explicit apt-get upgrade on all Debian/Ubuntu bases
(applied for the new java-runtime image only; wider rollout deserves
its own evaluation per #57). Alpine 3.23 -> next bump. Bumping the
Java toolchain from 17 -> 21.
@sam-at-luther sam-at-luther force-pushed the fix/docker-cache-and-base-image-refresh branch from 7e9e109 to 89cd99d Compare May 23, 2026 15:35
@sam-at-luther sam-at-luther merged commit d0783e2 into main May 23, 2026
20 checks passed
@sam-at-luther sam-at-luther mentioned this pull request May 24, 2026
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.

Address remaining container base-image debt after Alpine CVE refresh

1 participant