From da6b9e673b3ab1cfe87db40eb7eff540316f8b13 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 18 Oct 2020 21:28:19 -0700 Subject: [PATCH] add build version --- docker/Dockerfile.go_build_large | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile.go_build_large b/docker/Dockerfile.go_build_large index e0af93173..fa22aeade 100644 --- a/docker/Dockerfile.go_build_large +++ b/docker/Dockerfile.go_build_large @@ -2,7 +2,9 @@ FROM frolvlad/alpine-glibc as builder RUN apk add git go g++ RUN mkdir -p /go/src/github.com/chrislusf/ RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs -RUN cd /go/src/github.com/chrislusf/seaweedfs/weed && go install -tags 5BytesOffset +RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \ + && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \ + && go install -tags 5BytesOffset -ldflags "${LDFLAGS}" FROM alpine AS final LABEL author="Chris Lu"