作者 yangfu

Dockerfile fix

正在显示 1 个修改的文件 包含 7 行增加2 行删除
FROM golang:1.14
FROM golang:1.14 as builder
ENV APP_DIR $GOPATH/src/godevp
RUN mkdir -p $APP_DIR
WORKDIR $APP_DIR/
... ... @@ -6,10 +6,15 @@ COPY ./pkg pkg
COPY ./conf conf
COPY ./go.mod go.mod
COPY ./main.go main.go
RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
# 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"]
FROM alpine:latest
RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
WORKDIR /root/
COPY --from=builder /go/src/godevp .
EXPOSE 8082
ENTRYPOINT ["./godevp"]
\ No newline at end of file
... ...