FROM golang:latest #国内代理加速 ENV GOPROXY=https://goproxy.cn WORKDIR $GOPATH/src/github.com/smartoilets/gateway COPY . $GOPATH/src/github.com/smartoilets/gateway RUN go build -o ygw *.go #删除不必要的内容 RUN rm -f *.go && rm -f Dockerfile && rm -f README.md EXPOSE 10086 ENTRYPOINT ["./ygw"]