Commit 87557bd

Eric Bower  ·  2023-06-19 09:29:27 -0400 EDT
parent befe10e
multistage build docker
1 files changed,  +8, -2
+8, -2
......@@ -1,3 +1,9 @@
1-FROM nginx
2-COPY ./public /usr/share/nginx/html
1+FROM golang:1.20 as builder
2+COPY . /app
3+WORKDIR /app
4+RUN go build -o pgit ./main.go
5+RUN ./pgit
6+
7+FROM nginx:latest
8+COPY --from=builder /app/public /usr/share/nginx/html
39 EXPOSE 80