Files
rancher-docs/Dockerfile.staging
2018-09-04 10:51:48 -07:00

26 lines
673 B
Docker

FROM rancher/docs:build as build
ENV HUGO_ENV staging
WORKDIR /run
COPY gulpfile.babel.js /run/
COPY .eslintrc.js /run/
COPY config.toml /run/
COPY archetypes archetypes
COPY layouts layouts
COPY scripts scripts
COPY content content
COPY src src
ADD https://github.com/rancherlabs/website-theme/archive/master.tar.gz master.tar.gz
RUN tar -xzf master.tar.gz --strip 1 -C /run/node_modules/rancher-website-theme && rm master.tar.gz
RUN gulp build-staging
# Make sure something got built
RUN stat /run/public/index.html
FROM nginx
VOLUME /usr/share/nginx/html/docs
COPY --from=build /run/public /usr/share/nginx/html/docs/
COPY nginx.conf /etc/nginx/conf.d/default.conf