-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (20 loc) · 891 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (20 loc) · 891 Bytes
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
31
32
33
34
35
36
37
38
#####################################################################
# Build Stage #
#####################################################################
FROM hugomods/hugo:exts as builder
# Base URL
ARG HUGO_BASEURL=
ENV HUGO_BASEURL=${HUGO_BASEURL}
# Build site
COPY . /src
WORKDIR /src
RUN hugo --minify
# Set the fallback 404 page if defaultContentLanguageInSubdir is enabled,
# RUN cp ./public/en/404.html ./public/404.html
#####################################################################
# Final Stage #
#####################################################################
FROM nginx:1.28.0
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
# Copy the generated files to keep the image as small as possible.
COPY --from=builder /src/public /site