Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -25,13 +25,13 @@ ENV GO111MODULE=on \
|
|
25 |
CGO_ENABLED=1 \
|
26 |
GOOS=linux
|
27 |
|
28 |
-
WORKDIR /
|
29 |
RUN git clone https://github.com/songquanpeng/one-api.git -b v0.6.8 .
|
30 |
|
31 |
WORKDIR /build
|
32 |
-
RUN cp /go.mod go.sum ./
|
33 |
RUN go mod download
|
34 |
-
RUN cp -r /* .
|
35 |
COPY --from=builder /web/build ./web/build
|
36 |
RUN go build -trimpath -ldflags "-s -w -X 'github.com/songquanpeng/one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
37 |
|
|
|
25 |
CGO_ENABLED=1 \
|
26 |
GOOS=linux
|
27 |
|
28 |
+
WORKDIR /src
|
29 |
RUN git clone https://github.com/songquanpeng/one-api.git -b v0.6.8 .
|
30 |
|
31 |
WORKDIR /build
|
32 |
+
RUN cp /src/go.mod /src/go.sum ./
|
33 |
RUN go mod download
|
34 |
+
RUN cp -r /src/* .
|
35 |
COPY --from=builder /web/build ./web/build
|
36 |
RUN go build -trimpath -ldflags "-s -w -X 'github.com/songquanpeng/one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
37 |
|