forked from rancher/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.prod
28 lines (21 loc) · 813 Bytes
/
Dockerfile.prod
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
FROM rancher/docs:build as build
ENV HUGO_ENV production
WORKDIR /run
COPY config.toml /run/
COPY archetypes archetypes
COPY assets assets
COPY data data
COPY layouts layouts
COPY scripts scripts
COPY content content
COPY static static
COPY .git .git
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz /run/master.tar.gz
RUN mkdir -p /output /theme/rancher-website-theme && tar -xzf /run/master.tar.gz -C /run/node_modules/rancher-website-theme --strip=1 && rm /run/master.tar.gz
RUN ["hugo", "--buildFuture", "--baseURL=https://rancher.com/docs", "--destination=/output"]
# Make sure something got built
RUN stat /output/index.html
RUN ["npm","run","build-algolia"]
FROM nginx:alpine
COPY --from=build /output /usr/share/nginx/html/docs/
COPY nginx.conf /etc/nginx/conf.d/default.conf