Skip to content

Commit a552df7

Browse files
authored
Dockerfile: switch base image to distroless (#137)
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]>
1 parent 7fe75a7 commit a552df7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/wolfi-base as build
2-
RUN apk update && apk add build-base git openssh go-1.21
1+
FROM --platform=$BUILDPLATFORM golang:1.23-alpine as build
32

43
WORKDIR /work
54

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

17-
18-
FROM cgr.dev/chainguard/static:latest
16+
FROM gcr.io/distroless/static-debian12:nonroot
1917

2018
ENV HOME /home/nonroot
2119

0 commit comments

Comments
 (0)