github.com/martinohmann/rfoutlet@v1.2.1-0.20220707195255-8a66aa411105/Dockerfile (about) 1 FROM node:15.2.0-alpine3.10 as node-builder 2 3 ADD web/ /web 4 5 WORKDIR /web 6 7 RUN npm install && \ 8 npm run build 9 10 FROM golang:1.15.5-alpine3.12 as golang-builder 11 12 WORKDIR /go/src/github.com/martinohmann/rfoutlet 13 14 RUN apk --no-cache add git make 15 16 ADD go.mod . 17 ADD go.sum . 18 ADD Makefile . 19 20 RUN make deps 21 22 ARG GOARCH 23 ARG GOARM 24 25 COPY --from=node-builder /web/build web/build 26 27 ADD cmd/ cmd/ 28 ADD internal/ internal/ 29 ADD pkg/ pkg/ 30 ADD main.go main.go 31 32 RUN CGO_ENABLED=0 GOOS=linux make pack-app build 33 34 FROM scratch 35 36 COPY --from=golang-builder /go/src/github.com/martinohmann/rfoutlet/rfoutlet /rfoutlet 37 38 ENTRYPOINT ["/rfoutlet"] 39 CMD ["serve"]