|
|
FROM golang:latest
|
|
|
MAINTAINER 陈志颖 <steve.d.chan@qq.com>
|
|
|
ENV APP_DIR $GOPATH/src/allied-creation-basic
|
|
|
RUN mkdir -p $APP_DIR
|
|
|
WORKDIR $APP_DIR/
|
|
|
COPY ./pkg pkg
|
|
|
# COPY ./conf conf
|
|
|
COPY ./go.mod go.mod
|
|
|
COPY ./go.sum go.sum
|
|
|
COPY ./main.go main.go
|
|
|
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"]
|
|
|
ENTRYPOINT ["./allied-creation-basic"] |
|
|
\ No newline at end of file |
...
|
...
|
|