chore: improvements to Containerfile
This commit is contained in:
+2
-2
@@ -30,8 +30,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
|||||||
CGO_ENABLED=${CGO_ENABLED} \
|
CGO_ENABLED=${CGO_ENABLED} \
|
||||||
GOOS=${GOOS} \
|
GOOS=${GOOS} \
|
||||||
GOARCH=${GOARCH} \
|
GOARCH=${GOARCH} \
|
||||||
go build -trimpath \
|
go build -a -installsuffix cgo -trimpath \
|
||||||
-ldflags "-s -w -X main.BuildTime=${BUILD_TIME} -X main.Version=${VERSION}" \
|
-ldflags '-extldflags "-static" -s -w -X main.BuildTime=${BUILD_TIME} -X main.Version=${VERSION}' \
|
||||||
-o /out/${SERVICE} ./cmd/${SERVICE} && \
|
-o /out/${SERVICE} ./cmd/${SERVICE} && \
|
||||||
chmod +x /out/${SERVICE}
|
chmod +x /out/${SERVICE}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user