1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-28 06:10:27 +02:00

Merge pull request #1681 from LazyDBA247-Anyvision/master

Dockerfile: support build branches other than master
This commit is contained in:
Chris Lu 2020-12-15 09:32:33 -08:00 committed by GitHub
commit fc05963fa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -2,6 +2,8 @@ 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
ARG branch=${branch:-master}
RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $ARG
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 -ldflags "${LDFLAGS}"

View file

@ -2,6 +2,8 @@ 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
ARG branch=${branch:-master}
RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $ARG
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}"