IFMSS

Hugo Docker File


Hugo Docker File

Finally had some time to create a “good” (well, better anyway) Dockerfile for this page. Next steps: automating the build.

#####################################################################
#                            Build Stage                            #
#####################################################################
FROM hugomods/hugo:exts AS builder

# Base URL
ARG HUGO_BASEURL="https://ichfreumichsosehr.de/"
ENV HUGO_BASEURL=${HUGO_BASEURL}

WORKDIR /src

# Build site
COPY . .

# Replace below build command at will.
RUN hugo --minify

#####################################################################
#                            Final Stage                            #
#####################################################################
FROM nginx:alpine

COPY --from=builder /src/public /usr/share/nginx/html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]