From 9beb506ad4203acef70146ece57dfbc2d546a874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Thu, 28 Oct 2021 17:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- golang-builder/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/golang-builder/Dockerfile b/golang-builder/Dockerfile index ee8fb0e..8c11392 100644 --- a/golang-builder/Dockerfile +++ b/golang-builder/Dockerfile @@ -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 \ No newline at end of file +ENV TZ=Asia/Shanghai \ No newline at end of file