1
0
Fork 0
Learning-GoLang/simple-blog/Dockerfile

15 lines
336 B
Text
Raw Permalink Normal View History

2024-07-19 22:13:45 +02:00
FROM node:16.20-alpine3.18 AS JS_BUILD
COPY webapp /webapp
WORKDIR /webapp
RUN npm install && npm run build
FROM golang:1.22.1-alpine3.18 AS GO_BUILD
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server
FROM alpine:3.18.6
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server