-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 1.03 KB
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#####################################################################
# Build Stage #
#####################################################################
FROM hugomods/hugo:exts-0.148.2 AS builder
# Base URL
ARG HUGO_BASEURL=http://localhost:8080
ENV HUGO_BASEURL=${HUGO_BASEURL}
# Build site
COPY . /src
# Replace below build command at will.
# Setup Project
RUN npm run project-setup
# Install npm dependencies
RUN npm install
# Publish to GitHub Pages
RUN npm run build
# 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