refactor: Dockerfile
This commit is contained in:
parent
2232f72967
commit
a538c4f28e
@ -14,6 +14,7 @@ ENV GO111MODULE=on \
|
||||
GOOS=linux
|
||||
|
||||
WORKDIR /build
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
ADD go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
@ -21,7 +22,7 @@ COPY --from=builder /build/build ./web/build
|
||||
RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
||||
|
||||
FROM alpine
|
||||
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache ca-certificates tzdata \
|
||||
|
Loading…
Reference in New Issue
Block a user