diff --git a/Containerfile b/Containerfile index e66ba23..a9c85a3 100644 --- a/Containerfile +++ b/Containerfile @@ -30,8 +30,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ CGO_ENABLED=${CGO_ENABLED} \ GOOS=${GOOS} \ GOARCH=${GOARCH} \ - go build -trimpath \ - -ldflags "-s -w -X main.BuildTime=${BUILD_TIME} -X main.Version=${VERSION}" \ + go build -a -installsuffix cgo -trimpath \ + -ldflags '-extldflags "-static" -s -w -X main.BuildTime=${BUILD_TIME} -X main.Version=${VERSION}' \ -o /out/${SERVICE} ./cmd/${SERVICE} && \ chmod +x /out/${SERVICE}