feat(deploy): add release manifest with pinned base image digests
This commit is contained in:
1 parent
ea0982a762
commit
a0551a34b8
18 files changed
+2316
-21
No files matched your search
+11
-2
@@ -1,4 +1,13 @@
|
||||
FROM golang:1.26.8-alpine AS build
|
||||
# Base images are build arguments so that make -C deploy release-build can pin
|
||||
# each one to the digest it resolved; the defaults keep the agreed tags.
|
||||
ARG GO_IMAGE=golang:1.26.8-alpine
|
||||
ARG RUNTIME_IMAGE=gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
FROM ${GO_IMAGE} AS build
|
||||
|
||||
# Never download another Go toolchain: a go.mod that asks for a newer Go
|
||||
# fails the build instead of silently replacing 1.26.8.
|
||||
ENV GOTOOLCHAIN=local
|
||||
|
||||
WORKDIR /src/backend
|
||||
COPY go.mod go.sum ./
|
||||
@@ -7,7 +16,7 @@ RUN go mod download
|
||||
COPY . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -buildvcs=false -trimpath -ldflags="-s -w" -o /out/app ./cmd/app
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
FROM ${RUNTIME_IMAGE}
|
||||
|
||||
WORKDIR /
|
||||
COPY --from=build /out/app /app
|
||||
|
||||
Reference in new issue
Block a user