From 560735867bf12e1a1dac6bdecc3b9ee4dcea8815 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 7 Jul 2023 16:07:05 +0800 Subject: [PATCH] test --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 87ca125..6dbfa42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ # 多重构建,减少镜像大小 -# 构建:使用golang:1.15版本 +# 构建:使用golang:1.13版本 FROM registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/golang:1.18.4 as build # 容器环境变量添加,会覆盖默认的变量值 -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn,direct +#ENV GO111MODULE=on +ENV GOPROXY=https://proxy.golang.com.cn,direct ENV TZ="Asia/Shanghai" # 设置工作区 WORKDIR /go/release @@ -16,10 +16,9 @@ ADD . . RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -tags netgo -ldflags="-s -w" -installsuffix cgo -o zyos main.go FROM ubuntu:xenial as prod -LABEL maintainer="wuhanqin" +LABEL maintainer="sherlockwhite" ENV TZ="Asia/Shanghai" -COPY static/html static/html # 时区纠正 RUN rm -f /etc/localtime \ && ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \