mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-06 05:27:23 +00:00
Build with CGO_ENABLED=0 in Dockerfile
- Not strictly necessary at the moment because both our build layer and our run layer are based on alpine, but static linking our binary will help us later when we want to base our run image on something closer to scratch
This commit is contained in:
@@ -33,8 +33,8 @@ COPY internal ./internal
|
||||
COPY pkg ./pkg
|
||||
COPY tools ./tools
|
||||
COPY hack ./hack
|
||||
# Build the executable binary
|
||||
RUN GOOS=linux GOARCH=amd64 go build -ldflags "$(hack/get-ldflags.sh)" -o out ./cmd/placeholder-name-server/...
|
||||
# Build the executable binary (CGO_ENABLED=0 means static linking)
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(hack/get-ldflags.sh)" -o out ./cmd/placeholder-name-server/...
|
||||
|
||||
FROM alpine:latest
|
||||
# Install CA certs and some tools for debugging
|
||||
|
||||
Reference in New Issue
Block a user