Created
August 4, 2021 06:47
-
-
Save mikemackintosh/52dba09d44c20f87ea4fe9177ff99b0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:16-alpine3.11 as build-node | |
RUN apk --no-cache --virtual build-dependencies add \ | |
python \ | |
make \ | |
g++ | |
WORKDIR /workdir | |
COPY web/ . | |
RUN yarn install | |
RUN yarn build | |
FROM golang:1.17rc2-alpine3.14 as build-go | |
ENV GOPATH "" | |
RUN go env -w GOPROXY=direct | |
RUN apk add git | |
ADD go.mod go.sum ./ | |
RUN go mod download | |
ADD . . | |
COPY --from=build-node /workdir/build ./web/build | |
RUN go build -o /main | |
FROM alpine:3.13 | |
COPY --from=build-go /main /main | |
ENTRYPOINT [ "/main" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment