Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/branch-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,18 @@ jobs:
type=gha,scope=preview-${{ matrix.cache_scope }}
type=gha,scope=prod-${{ matrix.cache_scope }}
cache-to: type=gha,mode=max,scope=preview-${{ matrix.cache_scope }}
# Never cache-hit the distro-upgrade layer. `runtime` is the final
# stage in every one of these Dockerfiles; its base is digest-pinned
# and its `apk/dnf upgrade` RUN string never changes, so with
# `cache-from` its key is permanently stable and the upgrade silently
# stops executing after the first ever build. That is how
# `simplecontainer/github-actions:latest` came to ship python3
# 3.14.5-r0 (12 HIGH) while Alpine already served 3.14.7-r1 — and it
# would have frozen git / openssh-client / curl / libssl3 the same way.
# Scoped to the final stage on purpose: the expensive builder stage
# (SHA-verified Pulumi + gcloud download, install and slim) keeps its
# cache. Measured cost of re-running `runtime` alone: ~34 s.
no-cache-filters: runtime
provenance: false
# Phase 2 attestation (mirrors push.yaml). Preview builds get the SAME
# security guarantees as production releases so consumers pin-testing a
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@ jobs:
type=gha,scope=staging-github-actions
type=gha,scope=prod-github-actions
cache-to: type=gha,mode=max,scope=staging-github-actions
# Never cache-hit the distro-upgrade layer. `runtime` is the final
# stage in every one of these Dockerfiles; its base is digest-pinned
# and its `apk/dnf upgrade` RUN string never changes, so with
# `cache-from` its key is permanently stable and the upgrade silently
# stops executing after the first ever build. That is how
# `simplecontainer/github-actions:latest` came to ship python3
# 3.14.5-r0 (12 HIGH) while Alpine already served 3.14.7-r1 — and it
# would have frozen git / openssh-client / curl / libssl3 the same way.
# Scoped to the final stage on purpose: the expensive builder stage
# (SHA-verified Pulumi + gcloud download, install and slim) keeps its
# cache. Measured cost of re-running `runtime` alone: ~34 s.
no-cache-filters: runtime
provenance: false

- name: Build and push caddy staging image
Expand All @@ -136,6 +148,8 @@ jobs:
type=gha,scope=staging-caddy
type=gha,scope=prod-caddy
cache-to: type=gha,mode=max,scope=staging-caddy
# Same reason as above — see the first build step in this file.
no-cache-filters: runtime
provenance: false

# Phase 2: sign + SBOM + SLSA provenance for staging images. Staging has
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,18 @@ jobs:
# Release builds read and write `prod-*` only.
cache-from: type=gha,scope=prod-${{ matrix.image }}
cache-to: type=gha,mode=max,scope=prod-${{ matrix.image }}
# Never cache-hit the distro-upgrade layer. `runtime` is the final
# stage in every one of these Dockerfiles; its base is digest-pinned
# and its `apk/dnf upgrade` RUN string never changes, so with
# `cache-from` its key is permanently stable and the upgrade silently
# stops executing after the first ever build. That is how
# `simplecontainer/github-actions:latest` came to ship python3
# 3.14.5-r0 (12 HIGH) while Alpine already served 3.14.7-r1 — and it
# would have frozen git / openssh-client / curl / libssl3 the same way.
# Scoped to the final stage on purpose: the expensive builder stage
# (SHA-verified Pulumi + gcloud download, install and slim) keeps its
# cache. Measured cost of re-running `runtime` alone: ~34 s.
no-cache-filters: runtime
provenance: false
# Phase 2 attestation: keyless cosign sign + CycloneDX SBOM + SLSA L3
# provenance. The publish step above is the gating job. Sign/attest steps
Expand Down
10 changes: 9 additions & 1 deletion caddy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \
# falls back to local-filesystem cert storage, so a multi-replica parent
# stack gets per-pod ACME state and risks Let's Encrypt rate-limit lockout.

FROM caddy:2.11.4@sha256:df7f1c2fb114453b951de51a98efc010db1655a92c2e86be6706714e2417a78d
# The final stage is named `runtime` so CI can pass
# `no-cache-filters: runtime` to docker/build-push-action. Without it the
# distro-upgrade layer below is cached FOREVER: the base is digest-pinned and
# the RUN string never changes, so its cache key is permanently stable and
# `apk upgrade` never actually executes again. `simplecontainer/github-actions:latest`
# shipped python3 3.14.5-r0 (12 HIGH) for exactly this reason while Alpine
# already served 3.14.7-r1. Note `--no-cache` on the apk line is unrelated — it
# governs apk's own index cache, not Docker layers.
FROM caddy:2.11.4@sha256:df7f1c2fb114453b951de51a98efc010db1655a92c2e86be6706714e2417a78d AS runtime

RUN apk update && apk upgrade --no-cache && rm -rf /var/cache/apk/*

Expand Down
10 changes: 9 additions & 1 deletion cloud-helpers.aws.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Refresh: docker buildx imagetools inspect public.ecr.aws/lambda/provided:al2023
FROM public.ecr.aws/lambda/provided:al2023@sha256:5f3ae3216e07bb3677cc4dfa0c7867973f7e536abb114d6b44a7b8c558824812
# The final stage is named `runtime` so CI can pass
# `no-cache-filters: runtime` to docker/build-push-action. Without it the
# distro-upgrade layer below is cached FOREVER: the base is digest-pinned and
# the RUN string never changes, so its cache key is permanently stable and
# `dnf upgrade` never actually executes again. `simplecontainer/github-actions:latest`
# shipped python3 3.14.5-r0 (12 HIGH) for exactly this reason while Alpine
# already served 3.14.7-r1. Note `--no-cache` on the apk line is unrelated — it
# governs apk's own index cache, not Docker layers.
FROM public.ecr.aws/lambda/provided:al2023@sha256:5f3ae3216e07bb3677cc4dfa0c7867973f7e536abb114d6b44a7b8c558824812 AS runtime

# Pull post-tag distro fixes (e.g. glibc CVE-2026-4046 once published to AL2023 dnf).
RUN dnf upgrade -y --setopt=tsflags=nodocs \
Expand Down
6 changes: 5 additions & 1 deletion github-actions-staging.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ RUN rm -rf \
&& rm -rf /tmp/* /var/tmp/*

# ── runtime ─────────────────────────────────────────────────────────────────
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b
# Named `runtime` so CI can pass `no-cache-filters: runtime`. See
# github-actions.Dockerfile for why: without it the apk upgrade layer below sits
# behind a digest-pinned base with an unchanging RUN string, so its cache key
# never moves and the upgrade never actually re-runs.
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS runtime

# aws-cli needed by Pulumi local.Command shell-outs (e.g. `aws s3 sync` in the
# static-website template at pkg/clouds/pulumi/aws/static_website.go).
Expand Down
10 changes: 9 additions & 1 deletion github-actions.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,15 @@ RUN rm -rf \
&& rm -rf /tmp/* /var/tmp/*

# ── runtime ─────────────────────────────────────────────────────────────────
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b
# The final stage is named `runtime` so CI can pass
# `no-cache-filters: runtime` to docker/build-push-action. Without it the
# distro-upgrade layer below is cached FOREVER: the base is digest-pinned and
# the RUN string never changes, so its cache key is permanently stable and
# `apk upgrade` never actually executes again. `simplecontainer/github-actions:latest`
# shipped python3 3.14.5-r0 (12 HIGH) for exactly this reason while Alpine
# already served 3.14.7-r1. Note `--no-cache` on the apk line is unrelated — it
# governs apk's own index cache, not Docker layers.
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS runtime

# python3 stays — gcloud invokes it. py3-pip / binutils / upx confined to builder.
# aws-cli needed by Pulumi local.Command shell-outs (e.g. `aws s3 sync` in the
Expand Down
10 changes: 9 additions & 1 deletion kubectl.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Refresh: docker buildx imagetools inspect alpine/kubectl:latest
FROM alpine/kubectl:latest@sha256:5d380d18d2509483aef3df54d676c767d798d55ec9f3e02dabfa4c88fe6559bd
# The final stage is named `runtime` so CI can pass
# `no-cache-filters: runtime` to docker/build-push-action. Without it the
# distro-upgrade layer below is cached FOREVER: the base is digest-pinned and
# the RUN string never changes, so its cache key is permanently stable and
# `apk upgrade` never actually executes again. `simplecontainer/github-actions:latest`
# shipped python3 3.14.5-r0 (12 HIGH) for exactly this reason while Alpine
# already served 3.14.7-r1. Note `--no-cache` on the apk line is unrelated — it
# governs apk's own index cache, not Docker layers.
FROM alpine/kubectl:latest@sha256:5d380d18d2509483aef3df54d676c767d798d55ec9f3e02dabfa4c88fe6559bd AS runtime

# apk upgrade pulls post-tag distro fixes (e.g. nghttp2 CVE-2026-27135 at scan time).
RUN apk update \
Expand Down
Loading