作者 yangfu

Dockerfile 构建修改

正在显示 1 个修改的文件 包含 2 行增加2 行删除
... ... @@ -9,8 +9,8 @@ COPY ./main.go main.go
# RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
ENV GO111MODULE on
ENV GOPROXY https://goproxy.cn,direct
RUN ["go","mod","tidy"]
RUN ["go","build"]
RUN go mod tidy
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o godevp .
FROM alpine:latest
RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
... ...