diff --git a/Dockerfile b/Dockerfile index 1e4cb9f..64f1c0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ - -FROM alpine:latest +FROM alpine:latest AS build ARG HUGO_VERSION=0.68.3 @@ -15,7 +14,14 @@ RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hug WORKDIR /usr/src/app COPY . . RUN git submodule init && git submodule update --remote --merge +RUN /opt/hugo + +FROM nginx:mainline + +WORKDIR /usr/share/nginx/html + +COPY --from=build /usr/src/app/public . +RUN chmod 777 /var/cache/nginx -EXPOSE 1313 -CMD [ "/opt/hugo", "server", "--bind=0.0.0.0" ] +EXPOSE 80