We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 673b219 + ac9a3f5 commit e9f756fCopy full SHA for e9f756f
Dockerfile
@@ -1,7 +1,8 @@
1
FROM golang:1.18 as build
2
WORKDIR /go/src/app
3
COPY . .
4
-RUN mkdir -p /go/bin && go build -ldflags="-w -s" -o /go/bin/app ./...
+# Static build requires CGO_ENABLED=0
5
+RUN mkdir -p /go/bin && CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/app ./...
6
7
# Using a distroless image from https://github.com/GoogleContainerTools/distroless
8
# Image sourced from https://console.cloud.google.com/gcr/images/distroless/global/static
0 commit comments