Refactor Dockerfile to remove CGO_ENABLED=0 from build command, simplifying the build process for the agent.

This commit is contained in:
cedricve
2025-06-07 21:17:25 +00:00
parent 6d92817237
commit b154b56308

View File

@@ -36,7 +36,7 @@ ENV TAGS="timetzdata netgo osusergo"
ENV LDFLAGS="-s -w -extldflags '-static -latomic'"
RUN cd /go/src/github.com/kerberos-io/agent/machinery && \
go mod download && \
CGO_ENABLED=0 go build -tags "$TAGS" -ldflags "$LDFLAGS" -trimpath main.go && \
go build -tags "$TAGS" -ldflags "$LDFLAGS" -trimpath main.go && \
mkdir -p /agent && \
mv main /agent && \
mv version /agent && \