github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/cmd/srv-applet-mgr/Dockerfile (about) 1 # maybe use private hub? 2 #ARG DOCKER_REGISTRY=hub.docker.com 3 #ARG GO_VERSION=1.19 4 FROM golang:1.21 AS builder 5 6 # setup private pkg if needs 7 #ARG GITHUB_CI_TOKEN 8 #ARG GITHUB_HOST=github.com 9 #ARG GOPROXY=https://goproxy.cn,direct 10 #ENV GONOSUMDB=${GITHUB_HOST}/* 11 #ARG GOPRIVATE=${GITHUB_HOST} 12 #RUN git config --global url.https://github-ci-token:${GITHUB_CI_TOKEN}@${GITHUB_HOST}/.insteadOf https://${GITHUB_HOST}/ 13 14 # FROM build-env AS builder 15 16 WORKDIR /go/src 17 COPY ./ ./ 18 19 # build 20 #ARG COMMIT_SHA 21 RUN cd ./cmd/srv-applet-mgr && make target 22 23 # runtime 24 FROM golang:1.21 AS runtime 25 26 COPY --from=builder /go/src/build/srv-applet-mgr/srv-applet-mgr /go/bin/srv-applet-mgr 27 COPY --from=builder /go/src/build/srv-applet-mgr/openapi.json /go/bin/openapi.json 28 EXPOSE 8888 29 30 WORKDIR /go/bin 31 ENTRYPOINT ["/go/bin/srv-applet-mgr"]