Dockerfile 587 字节
FROM 192.168.0.243:5000/mmm/mmm-oppmg:base

# ENV GOPROXY https://goproxy.cn
ENV GOPATH /go
ENV APP_DIR $GOPATH/src/oppmg
# Recompile the standard library without CGO
# RUN CGO_ENABLED=0 go install -a std

RUN mkdir -p $APP_DIR
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo 'Asia/Shanghai' > /etc/timezone
# Set the entrypoint
#ENTRYPOINT (cd $APP_DIR && ./\src\oppmg)
ADD . $APP_DIR

# Compile the binary and statically link
RUN cd $APP_DIR && CGO_ENABLED=0  go build -mod=vendor -ldflags '-d -w -s' -o oppmg
WORKDIR $APP_DIR
EXPOSE 8080 443
CMD ["./oppmg"]