-
Notifications
You must be signed in to change notification settings - Fork 514
/
Dockerfile-docs
35 lines (25 loc) · 1005 Bytes
/
Dockerfile-docs
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
FROM python:3.12 as builder
# set workdir
RUN mkdir -p $HOME/application
WORKDIR $HOME/application
# copy the entire application
COPY --chown=1001:root . .
RUN pip3 install -r theme_common/requirements.txt
# Combine Theme Resources
RUN python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
# Produce mkdocs file
RUN python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
# build the docs
RUN mkdocs build
FROM nginxinc/nginx-unprivileged:1.27-alpine as deploy
COPY --from=builder $HOME/application/site/ /usr/share/nginx/html/reloader/
COPY docs-nginx.conf /etc/nginx/conf.d/default.conf
# set non-root user
USER 1001
LABEL name="Stakater Reloader Documentation" \
maintainer="Stakater <[email protected]>" \
vendor="Stakater" \
release="1" \
summary="Documentation for Stakater Reloader"
EXPOSE 8080:8080/tcp
CMD ["nginx", "-g", "daemon off;"]