FROM golang as build WORKDIR /build COPY . . ENV GO111MODULE=on ENV GOPROXY=https://goproxy.cn,direct RUN go mod download RUN go build -o app FROM alpine COPY --from=build /build/app /bin ENTRYPOINT ["/bin/app"]