-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfileLocal
44 lines (31 loc) · 1.29 KB
/
DockerfileLocal
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
36
37
38
39
40
41
42
43
44
FROM python:3.13-alpine as builder
# set workdir
RUN mkdir -p $HOME/application
WORKDIR $HOME/application
# copy the entire application
COPY --chown=1001:root . .
RUN pip install -r theme_common/requirements.txt
# In case you have your own python dependencies, you can use activate below command:
# RUN pip install -r requirements.txt
# pre-mkbuild step, we are infusing common and local theme changes
RUN python theme_common/scripts/combine_theme_resources.py -s theme_common/resources -ov theme_override/resources -o dist/_theme
RUN python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
RUN rm -f 'prepare_theme.sh' && \
rm -rf theme_global && \
rm -rf theme_common
# build the docs
RUN mkdocs build
# remove the build theme because it is not needed after site is build.
RUN rm -rf dist
FROM nginxinc/nginx-unprivileged:1.27-alpine as deploy
COPY --from=builder $HOME/application/site/ /usr/share/nginx/html/
COPY default.conf /etc/nginx/conf.d/
# set non-root user
USER 1001
LABEL name="Multi Tenant Operator Documentation" \
maintainer="Stakater <[email protected]>" \
vendor="Stakater" \
release="1" \
summary="Documentation for Multi Tenant Operator"
EXPOSE 8080:8080/tcp
CMD ["nginx", "-g", "daemon off;"]