ci: build through the internal package cache (CT130 pkg-cache) #5

Merged
jknapp merged 1 commits from ci/pkg-cache into trunk 2026-10-22 14:15:10 +00:00
Owner

Wires the cmc image build to the internal package cache (CT130 pkg-cache, https://192.168.1.40), same scheme as cloud-apache-container / cloud-node-container.

Changes

  • Workflow: resolve almalinux/9-base:latest digest directly from Docker Hub (.gitea/scripts/resolve-base-image.sh); probe the cache with the pinned CA (pkg-cache: repos=... registry-mirror=...); BuildKit registry mirror only when the base is digest-pinned and the mirror answers; pass BASE_IMAGE + PKG_CACHE build-args. Job name, tag (cmc:latest) and trigger unchanged.
  • Dockerfile: ARG BASE_IMAGE / ARG PKG_CACHE; one package RUN: rpm -> release-install epel (GPG-verified, replaces the unverified dnf install https://.../epel-release-latest-9.noarch.rpm) -> rpm -> dnf update -> dnf install memcached procps-ng -> restore -> clean. Without PKG_CACHE it uses the upstream repos as before.
  • Canonical copies (byte-identical to cloud-apache-container): scripts/pkg-cache-repos.sh, .gitea/scripts/resolve-base-image.sh (CI only, not COPYed into the image), keys/pkg-cache/.

Tested

  • Local fallback (no PKG_CACHE, BASE_IMAGE digest): build OK, FROM docker.io/almalinux/9-base@sha256:9736fe0e..., epel-release digests signatures OK from dl.fedoraproject.org, memcached 1.6.9 + procps-ng installed, no cache reference in /etc/yum.repos.d.
  • Cache path (CI-runner clone CT, docker 26 / buildx 0.13, PKG_CACHE=https://192.168.1.40): build OK, epel-release verified from https://192.168.1.40/epel/..., AlmaLinux + EPEL repos via the cache, restore printed no reference to 192.168.1.40 left; memcached -V = 1.6.9.

🤖 Generated with Claude Code

Wires the cmc image build to the internal package cache (CT130 pkg-cache, https://192.168.1.40), same scheme as cloud-apache-container / cloud-node-container. **Changes** - Workflow: resolve `almalinux/9-base:latest` digest directly from Docker Hub (`.gitea/scripts/resolve-base-image.sh`); probe the cache with the pinned CA (`pkg-cache: repos=... registry-mirror=...`); BuildKit registry mirror only when the base is digest-pinned and the mirror answers; pass `BASE_IMAGE` + `PKG_CACHE` build-args. Job name, tag (`cmc:latest`) and trigger unchanged. - Dockerfile: `ARG BASE_IMAGE` / `ARG PKG_CACHE`; one package RUN: `rpm` -> `release-install epel` (GPG-verified, replaces the unverified `dnf install https://.../epel-release-latest-9.noarch.rpm`) -> `rpm` -> `dnf update` -> `dnf install memcached procps-ng` -> `restore` -> clean. Without `PKG_CACHE` it uses the upstream repos as before. - Canonical copies (byte-identical to cloud-apache-container): `scripts/pkg-cache-repos.sh`, `.gitea/scripts/resolve-base-image.sh` (CI only, not COPYed into the image), `keys/pkg-cache/`. **Tested** - Local fallback (no PKG_CACHE, BASE_IMAGE digest): build OK, `FROM docker.io/almalinux/9-base@sha256:9736fe0e...`, epel-release `digests signatures OK` from dl.fedoraproject.org, memcached 1.6.9 + procps-ng installed, no cache reference in /etc/yum.repos.d. - Cache path (CI-runner clone CT, docker 26 / buildx 0.13, `PKG_CACHE=https://192.168.1.40`): build OK, epel-release verified from `https://192.168.1.40/epel/...`, AlmaLinux + EPEL repos via the cache, restore printed `no reference to 192.168.1.40 left`; `memcached -V` = 1.6.9. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-10-22 14:15:00 +00:00
- Base image pinned by digest resolved directly from Docker Hub
  (.gitea/scripts/resolve-base-image.sh); registry mirror only when pinned.
- Probe the cache over TLS with the pinned CA; without it, builds use the
  upstream repositories and Docker Hub exactly as before.
- Dockerfile: ARG BASE_IMAGE / PKG_CACHE; package RUN rewrites repos via
  scripts/pkg-cache-repos.sh (canonical copy from cloud-apache-container),
  installs epel-release with GPG-verified release-install, restores repo
  files before the RUN ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jknapp merged commit 6abe18b6fc into trunk 2026-10-22 14:15:10 +00:00
jknapp deleted branch ci/pkg-cache 2026-10-22 14:15:10 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cloud-hosting-platform/cloud-memcached-container#5