Dockerfile
471 字节
FROM golang:latest
#FROM 192.168.0.243:5000/mmm/digital-platform:20220831
ENV APP_DIR $GOPATH/src/digital-platform
RUN mkdir -p $APP_DIR
WORKDIR $APP_DIR/
COPY ./pkg pkg
COPY ./go.mod go.mod
COPY ./go.sum go.sum
COPY ./main.go main.go
COPY ./key key
RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
ENV GO111MODULE on
ENV GOPROXY https://goproxy.io
RUN ["go","mod","tidy"]
RUN ["ls"]
RUN ["go","build","-o","performance"]
ENTRYPOINT ["./performance"]