From 673b4de7e69a5d02afeaaceffd5dc999700aa5f5 Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Fri, 27 Nov 2026 16:30:27 +0100 Subject: [PATCH] feat: upgrade Alpine packages in every runtime image on each release build, and move web and admin to nginx 1.30 and the updater to the docker 29 CLI --- admin/Dockerfile | 5 ++++- deploy/docker/backend.Dockerfile | 3 +++ deploy/docker/cli.Dockerfile | 3 +++ deploy/docker/consumer.Dockerfile | 3 +++ deploy/docker/forms.Dockerfile | 3 +++ deploy/docker/realtime.Dockerfile | 3 +++ deploy/docker/updater.Dockerfile | 5 ++++- deploy/docker/worker.Dockerfile | 3 +++ tracking/Dockerfile | 3 +++ web/Dockerfile | 5 ++++- 10 files changed, 33 insertions(+), 3 deletions(-) diff --git a/admin/Dockerfile b/admin/Dockerfile index dab7990c2..cab4ef125 100644 --- a/admin/Dockerfile +++ b/admin/Dockerfile @@ -47,7 +47,10 @@ RUN --mount=type=secret,id=sentry_auth_token,required=false \ # Stage 2: serve the built SPA from nginx with a history fallback. The # entrypoint renders /config.js from container env at startup. -FROM nginx:1.27-alpine +FROM nginx:1.30-alpine +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx-security-headers.conf /etc/nginx/warmbly-security-headers.conf RUN nginx -t diff --git a/deploy/docker/backend.Dockerfile b/deploy/docker/backend.Dockerfile index 91ff320c4..efc34dbbb 100644 --- a/deploy/docker/backend.Dockerfile +++ b/deploy/docker/backend.Dockerfile @@ -37,6 +37,9 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ # Runtime stage FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache ARG GO_TAGS="" # The PostgreSQL clients are here for `warmblyctl backup` and `warmblyctl restore`, diff --git a/deploy/docker/cli.Dockerfile b/deploy/docker/cli.Dockerfile index 19a826502..15eaca12b 100644 --- a/deploy/docker/cli.Dockerfile +++ b/deploy/docker/cli.Dockerfile @@ -28,6 +28,9 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ -o /out/warmbly ./cmd/cli FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache RUN apk add --no-cache ca-certificates tzdata && adduser -D -u 1000 warmbly diff --git a/deploy/docker/consumer.Dockerfile b/deploy/docker/consumer.Dockerfile index e01e4c40c..f19b353cb 100644 --- a/deploy/docker/consumer.Dockerfile +++ b/deploy/docker/consumer.Dockerfile @@ -25,6 +25,9 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ # Runtime stage FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache ARG GO_TAGS="" RUN apk add --no-cache ca-certificates tzdata && \ diff --git a/deploy/docker/forms.Dockerfile b/deploy/docker/forms.Dockerfile index 01fbf1ceb..a09040e15 100644 --- a/deploy/docker/forms.Dockerfile +++ b/deploy/docker/forms.Dockerfile @@ -48,6 +48,9 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ # Runtime stage FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache RUN apk add --no-cache ca-certificates tzdata && \ adduser -D -u 1000 warmbly diff --git a/deploy/docker/realtime.Dockerfile b/deploy/docker/realtime.Dockerfile index cceefc396..2953b2cd3 100644 --- a/deploy/docker/realtime.Dockerfile +++ b/deploy/docker/realtime.Dockerfile @@ -27,6 +27,9 @@ RUN mix release # Runtime stage. The alpine version must be at least the builder image's, or # the crypto NIF fails to load against an older libcrypto (missing symbols). FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache RUN apk add --no-cache libstdc++ openssl ncurses-libs RUN adduser -D -u 1000 warmbly diff --git a/deploy/docker/updater.Dockerfile b/deploy/docker/updater.Dockerfile index 4557ba8e0..c6123ebd9 100644 --- a/deploy/docker/updater.Dockerfile +++ b/deploy/docker/updater.Dockerfile @@ -21,7 +21,10 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w -X github.com/warmbly/warmbly/internal/version.Version=$VERSION -X github.com/warmbly/warmbly/internal/version.Commit=$COMMIT -X github.com/warmbly/warmbly/internal/version.BuiltAt=$BUILT_AT" -o /out/updater ./cmd/updater # Runtime: the official docker CLI image already carries the compose plugin. -FROM docker:27-cli +FROM docker:29-cli +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache RUN apk add --no-cache git ca-certificates tzdata && mkdir -p /var/lib/warmbly-updater diff --git a/deploy/docker/worker.Dockerfile b/deploy/docker/worker.Dockerfile index 3a7bcb26e..1ea12a833 100644 --- a/deploy/docker/worker.Dockerfile +++ b/deploy/docker/worker.Dockerfile @@ -25,6 +25,9 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ # Runtime stage FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache ARG GO_TAGS="" RUN apk add --no-cache ca-certificates tzdata && \ diff --git a/tracking/Dockerfile b/tracking/Dockerfile index cfaa0beed..51f78760b 100644 --- a/tracking/Dockerfile +++ b/tracking/Dockerfile @@ -49,6 +49,9 @@ RUN --mount=type=cache,id=cargo-registry,target=/usr/local/cargo/registry \ # Runtime stage FROM alpine:3.23 +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache RUN apk add --no-cache ca-certificates libgcc && \ addgroup -g 1000 tracking && \ diff --git a/web/Dockerfile b/web/Dockerfile index d3524cc45..e89838631 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -47,7 +47,10 @@ RUN --mount=type=secret,id=sentry_auth_token,required=false \ # Stage 2: serve the built SPA from nginx with a history fallback. The # entrypoint renders /config.js from container env at startup. -FROM nginx:1.27-alpine +FROM nginx:1.30-alpine +# VERSION keys the build cache, so every release re-runs this against Alpine's current packages. +ARG VERSION +RUN apk upgrade --no-cache RUN apk add --no-cache curl jq COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx-security-headers.conf /etc/nginx/warmbly-security-headers.conf