docs/Dockerfile
James Brumond daac8a316c
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Build container images / build (push) Successful in 1m55s
explicitly create www dir in container
2023-08-18 18:41:26 -07:00

26 lines
649 B
Docker

ARG DOC_UTILS_VERSION
ARG NGINX_VERSION
FROM gitea.jbrumond.me/doc-utils/utils:${DOC_UTILS_VERSION} AS build_stage
WORKDIR /workspace
# build website from source files
COPY docs layouts partials config.yaml metadata.json /workspace/
RUN mkdir /workspace/www
RUN docs2website config.yaml
FROM nginx:${NGINX_VERSION} AS deploy_stage
EXPOSE 80
# copy actual web content built above
COPY --from=build_stage /workspace/www/ /usr/share/nginx/html
RUN chmod -R +rX /usr/share/nginx/html
# nginx config files
COPY conf/nginx.conf /etc/nginx/nginx.conf
COPY conf/default.conf /etc/nginx/conf.d/default.conf
COPY conf/mime.types /etc/nginx/mime.types