File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ LABEL stage=gobuilder \
55# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
66RUN apk add gcc g++ make libffi-dev openssl-dev libtool git
77
8- ENV CGO_ENABLED 0
9- # ENV GOPROXY https://goproxy.cn,direct
8+ ENV CGO_ENABLED= 0
9+ # ENV GOPROXY= https://goproxy.cn,direct
1010
1111WORKDIR /build
1212
@@ -15,19 +15,14 @@ COPY go.sum .
1515RUN go mod download
1616
1717COPY . .
18- RUN BRANCH=$(git rev-parse --abbrev-ref HEAD) && \
19- VERSION=$(git describe --tags | cut -d'-' -f1) && \
20- COMMIT=$(git rev-parse --short HEAD) && \
21- GO_VERSION=$(go env GOVERSION) && \
22- BUILD_TIME=$(date +%FT%T%z) && \
23- go build -ldflags="-s -w -X main.BRANCH=${BRANCH} -X main.VERSION=${VERSION} -X main.COMMIT=${COMMIT} -X main.GoVersion=${GO_VERSION} -X main.BuildTime=${BUILD_TIME}" -trimpath -o gpu-docker-api cmd/gpu-docker-api/main.go
18+ RUN make linux
2419
2520FROM ubuntu:22.04
2621
2722VOLUME /data
2823WORKDIR /data
2924
30- COPY --from=builder /build/gpu-docker-api /data/gpu-docker-api
25+ COPY --from=builder /build/bin/ gpu-docker-api-linux-amd64 /data/gpu-docker-api
3126
3227EXPOSE 2378
3328
You can’t perform that action at this time.
0 commit comments