diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0fb1856 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM alpine:latest as build + +ENV HUGO_VERSION 0.56.0 +ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.tar.gz + +# Install Hugo +RUN set -x && \ + apk add --update wget ca-certificates git && \ + wget https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} && \ + tar xzf ${HUGO_BINARY} && \ + rm -r ${HUGO_BINARY} && \ + mv hugo /usr/bin + +COPY ./ /site + +WORKDIR /site + +RUN /usr/bin/hugo --gc --minify --enableGitInfo + +FROM nginx:alpine + +COPY --from=build /site/public /usr/share/nginx/html +