23 lines
975 B
Docker
23 lines
975 B
Docker
#####################################################################
|
|
# Build Stage #
|
|
#####################################################################
|
|
FROM hugomods/hugo:exts as builder
|
|
# Base URL
|
|
ARG HUGO_BASEURL=https://theinfopunk.com
|
|
ENV HUGO_BASEURL=${HUGO_BASEURL}
|
|
# Build site
|
|
RUN mkdir -p /src/public
|
|
COPY . /src
|
|
# Replace below build command at will.
|
|
RUN hugo --minify --enableGitInfo
|
|
# Set the fallback 404 page if defaultContentLanguageInSubdir is enabled,
|
|
# please replace the `en` with your default language code.
|
|
# RUN cp ./public/en/404.html ./public/404.html
|
|
|
|
#####################################################################
|
|
# Final Stage #
|
|
#####################################################################
|
|
FROM hugomods/hugo:nginx
|
|
# Copy the generated files to keep the image as small as possible.
|
|
COPY --from=builder /src/public /site
|