|
20 | 20 | # (https://kairos.io/docs/reference/auroraboot/). See samples/README.md. |
21 | 21 |
|
22 | 22 | # ---------------------------------------------------------------------------- |
23 | | -# Versions: pinned by default. Bump together via build args; CI should pin via |
24 | | -# image digest as well once a release pipeline lands. |
| 23 | +# Versions: pinned by default. Bump together via build args. Base images are |
| 24 | +# digest-pinned below (kairos#4203) for a reproducible, tamper-evident supply chain. |
25 | 25 | # ---------------------------------------------------------------------------- |
26 | 26 | # Pure upstream Hadron base (musl). kairos-init transforms it into a Kairos OS in |
27 | 27 | # the final stage, exactly as the canonical Kairos image build does. |
28 | | -ARG KAIROS_BASE_IMAGE=ghcr.io/kairos-io/hadron:v0.4.0 |
| 28 | +# All base images are DIGEST-pinned (image:tag@sha256:...) for a reproducible, |
| 29 | +# tamper-evident supply chain (kairos#4203). The tag is kept for readability; the |
| 30 | +# digest is the multi-arch index digest, so cross-arch builds still resolve the |
| 31 | +# right manifest. When bumping a tag, re-resolve the digest |
| 32 | +# (docker buildx imagetools inspect <image:tag>) and update both here and in the |
| 33 | +# Makefile defaults that override these ARGs. |
| 34 | +ARG KAIROS_BASE_IMAGE=ghcr.io/kairos-io/hadron:v0.4.0@sha256:1e19d9cd5a70dfc6940f58d899e72f6776f4d64934cd6f402f4a4186ccc40d4d |
29 | 35 | # kairos-init that matches the version Kairos itself uses to build Hadron. Older |
30 | 36 | # pins (e.g. v0.6.0) cannot regenerate Hadron's initramfs (dracut -f ... fails). |
31 | | -ARG KAIROS_INIT_IMAGE=quay.io/kairos/kairos-init:v0.14.6 |
32 | | -ARG GO_BUILDER_IMAGE=golang:1.26.4-alpine |
| 37 | +ARG KAIROS_INIT_IMAGE=quay.io/kairos/kairos-init:v0.14.6@sha256:e53eb7e5ada035e7e192f072f9e041ca5d60440ecf8c766c32e7d95253b293e7 |
| 38 | +ARG GO_BUILDER_IMAGE=golang:1.26.4-alpine@sha256:3ad57304ad93bbec8548a0437ad9e06a455660655d9af011d58b993f6f615648 |
33 | 39 | ARG TARGETARCH=amd64 |
34 | 40 |
|
35 | 41 | # containerd and kubelet are ALWAYS built fully static from source: Hadron is |
36 | 42 | # musl, so the glibc-linked official releases cannot exec. A fully static binary |
37 | 43 | # runs on musl AND glibc. STATIC_BUILDER is the from-source toolchain (Debian Go, |
38 | 44 | # matching the validated recipe); patch-pinned (matches GO_BUILDER_IMAGE's pin |
39 | 45 | # level) so the from-source compiler is reproducible across Go patch releases. |
40 | | -# Digest-pinning all base images remains a tracked backlog item. |
41 | | -ARG STATIC_BUILDER_IMAGE=golang:1.26.4 |
| 46 | +ARG STATIC_BUILDER_IMAGE=golang:1.26.4@sha256:f96cc555eb8db430159a3aa6797cd5bae561945b7b0fe7d0e284c63a3b291609 |
42 | 47 |
|
43 | 48 | # Kubernetes (must be within the supported window the provider enforces at |
44 | 49 | # runtime: 1.34 / 1.35 / 1.36 as of 2026). |
@@ -93,7 +98,7 @@ RUN go build \ |
93 | 98 | # kubeadm/kubectl/crictl are already static and run on musl unchanged. kubelet is |
94 | 99 | # NOT downloaded here -- it is built static from source (see kubelet-build). |
95 | 100 | # ---------------------------------------------------------------------------- |
96 | | -FROM alpine:3.21 AS k8s-binaries |
| 101 | +FROM alpine:3.21@sha256:48b0309ca019d89d40f670aa1bc06e426dc0931948452e8491e3d65087abc07d AS k8s-binaries |
97 | 102 | ARG KUBERNETES_VERSION |
98 | 103 | ARG CRICTL_VERSION |
99 | 104 | ARG TARGETARCH |
@@ -127,7 +132,7 @@ RUN set -eux; \ |
127 | 132 | # (runc, CNI). containerd is built static from source (see containerd-build); |
128 | 133 | # runc and the CNI plugins are already static and run on musl unchanged. |
129 | 134 | # ---------------------------------------------------------------------------- |
130 | | -FROM alpine:3.21 AS runtime-binaries |
| 135 | +FROM alpine:3.21@sha256:48b0309ca019d89d40f670aa1bc06e426dc0931948452e8491e3d65087abc07d AS runtime-binaries |
131 | 136 | ARG RUNC_VERSION |
132 | 137 | ARG CNI_PLUGINS_VERSION |
133 | 138 | ARG TARGETARCH |
@@ -231,7 +236,7 @@ RUN set -eux; \ |
231 | 236 | # image and imported into containerd at boot, so a first boot converges with NO |
232 | 237 | # registry access (air-gap). CNI is intentionally NOT bundled (operator's choice). |
233 | 238 | # ---------------------------------------------------------------------------- |
234 | | -FROM alpine:3.21 AS image-bundler |
| 239 | +FROM alpine:3.21@sha256:48b0309ca019d89d40f670aa1bc06e426dc0931948452e8491e3d65087abc07d AS image-bundler |
235 | 240 | ARG KUBERNETES_VERSION |
236 | 241 | ARG TARGETARCH |
237 | 242 | # Pinned; crane is a static Go binary that runs on musl. |
|
0 commit comments