2020-07-14 18:56:20 +00:00
|
|
|
FROM golang@sha256:cee6f4b901543e8e3f20da3a4f7caac6ea643fd5a46201c3c2387183a332d989 AS builder
|
|
|
|
RUN apk update && apk add --no-cache git make ca-certificates && update-ca-certificates
|
|
|
|
COPY main.go /go/src/git.martyn.berlin/martyn/twitchsingstools/
|
|
|
|
COPY internal/ /go/src/git.martyn.berlin/martyn/twitchsingstools/internal/
|
|
|
|
COPY Makefile /go/src/git.martyn.berlin/martyn/twitchsingstools/
|
|
|
|
RUN cd /go/src/git.martyn.berlin/martyn/twitchsingstools/; make deps ; make static
|
|
|
|
|
2020-08-01 09:38:05 +00:00
|
|
|
FROM library/node:14.7.0-stretch AS frontend
|
|
|
|
COPY build/react-frontend /frontend
|
2020-08-01 10:04:14 +00:00
|
|
|
RUN cd /frontend; npm install && npm run build
|
2020-08-01 09:38:05 +00:00
|
|
|
|
|
|
|
FROM debian
|
2020-07-14 18:56:20 +00:00
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
|
|
COPY --from=builder /go/src/git.martyn.berlin/martyn/twitchsingstools /app/
|
|
|
|
COPY web/ /app/web/
|
2020-08-01 09:38:05 +00:00
|
|
|
COPY --from=frontend /frontend/build /app/web/react-frontend
|
2020-07-14 18:56:20 +00:00
|
|
|
WORKDIR /app
|
|
|
|
CMD ["/app/twitchsingstools"]
|