build(docker): unify Go build images and use distroless for s3config

This commit is contained in:
kk10
2026-11-04 22:50:47 +03:00
parent fd56de4895
commit 592594ae94
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27.1-alpine3.24 AS build
FROM golang:1.27.1 AS build
ENV CGO_ENABLED=0
RUN go install github.com/pressly/goose/v3/cmd/goose@v3.28.0
+2 -2
View File
@@ -1,4 +1,4 @@
FROM golang:1.27.1-alpine3.24 AS build
FROM golang:1.27.1 AS build
ENV CGO_ENABLED=0
WORKDIR /src
@@ -8,6 +8,6 @@ RUN go mod download
COPY . .
RUN go build -o /out/s3config ./cmd/s3config
FROM alpine:3.24
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/s3config /usr/local/bin/s3config
ENTRYPOINT ["/usr/local/bin/s3config"]