1
0
mirror of https://github.com/rancher/docs.git synced 2026-02-05 09:45:47 +01:00
Files
docs/Dockerfile.staging
Kyr Shatskyy 45cdc5a817 Dockerfile.*: add RANCHER_DOCS_PACKAGE arg
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2022-10-25 15:59:00 +02:00

28 lines
847 B
Docker

ARG RANCHER_DOCS_PACKAGE=rancher/docs
FROM $RANCHER_DOCS_PACKAGE:build as build
ENV HUGO_ENV staging
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", "--buildDrafts", "--buildFuture", "--baseURL=https://staging.rancher.com/docs", "--destination=/output"]
# Make sure something got built
RUN stat /output/index.html
FROM nginx:alpine
COPY --from=build /output /usr/share/nginx/html/docs/
COPY nginx.conf /etc/nginx/conf.d/default.conf