Skip to content

Commit

Permalink
Dockerfile: switch base image to distroless
Browse files Browse the repository at this point in the history
Chainguard removed arm/v7 support from their free images:
https://www.chainguard.dev/unchained/changes-to-static-git-and-busybox-developer-images

Switch to the official `go` image for builds and distroless for
packaging.

Signed-off-by: Andrew Lytvynov <[email protected]>
  • Loading branch information
awly committed Aug 23, 2024
1 parent 7fe75a7 commit 5ec6981
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/wolfi-base as build
RUN apk update && apk add build-base git openssh go-1.21
FROM --platform=$BUILDPLATFORM golang:1.23-alpine as build

WORKDIR /work

Expand All @@ -14,8 +13,7 @@ RUN \
fi; \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -v ./cmd/golink


FROM cgr.dev/chainguard/static:latest
FROM gcr.io/distroless/static-debian12:nonroot

ENV HOME /home/nonroot

Expand Down

0 comments on commit 5ec6981

Please sign in to comment.