This commit is contained in:
李寻欢 2021-10-28 17:42:43 +08:00
parent 0bb7134be9
commit 9beb506ad4
1 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,9 @@ FROM golang:1.17.2-alpine
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn
# 修改alpine源为中科大的源安装必要工具
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
apk update && \
@ -9,6 +12,4 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositorie
apk add --no-cache ca-certificates gcc g++ && update-ca-certificates && \
apk add --no-cache --update tzdata && \
rm -rf /var/cache/apk/*
ENV TZ=Asia/Shanghai
# 修改源
RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct
ENV TZ=Asia/Shanghai