diff --git a/Dockerfile b/Dockerfile index dbe6748..4b58e7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20.4-alpine3.18 +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20.6-alpine3.18 ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -11,7 +11,7 @@ RUN mkdir /app ADD . /app/ WORKDIR /app ENV CGO_ENABLED=0 -RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags "-s -w -X main.version=$(git describe --tags) -X main.commit=$(git rev-parse HEAD)" -o sniproxy . +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOFLAGS=-buildvcs=false go build -ldflags "-s -w -X main.version=$(git describe --tags) -X main.commit=$(git rev-parse HEAD)" -o sniproxy . CMD ["/app/sniproxy"] FROM scratch