From 8c3b1a3617a932943d533d22d29ead57c1a1de7b Mon Sep 17 00:00:00 2001 From: Carl Tibule Date: Sun, 25 Aug 2024 20:44:03 -0500 Subject: [PATCH] Redid the Dockerfile to get arround error with the public folder not being found --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4b195ac..a81ebae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ -FROM alpine:latest +# Reference https://medium.com/@lorique/howto-multi-stage-docker-builds-with-hugo-78a53565d567 + +FROM alpine:latest AS build RUN apk add --update hugo +WORKDIR /opt/HugoApp +COPY . . RUN hugo FROM nginx:stable-alpine -COPY public /usr/share/nginx/html -EXPOSE 80 \ No newline at end of file +WORKDIR /usr/share/nginx/html +COPY --from=build /opt/HugoApp/public . +EXPOSE 80/tcp \ No newline at end of file