change Dockerfile增加包管理代理环境变量
parent
6833477292
commit
b75050914d
|
@ -13,6 +13,10 @@ RUN go mod download
|
|||
# 复制源代码
|
||||
COPY . .
|
||||
|
||||
# 设置环境变量
|
||||
ENV GO111MODULE=on
|
||||
ENV GOPROXY=https://goproxy.io,direct
|
||||
|
||||
# 构建应用
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
|
||||
|
||||
|
|
Loading…
Reference in New Issue