-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 768 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 768 Bytes
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
FROM python:3.12 as builder
RUN pip3 install mkdocs-mermaid2-plugin mkdocs-table-reader-plugin mkdocs-include-markdown-plugin
# set workdir
RUN mkdir -p $HOME/application
WORKDIR $HOME/application
# copy the entire application
COPY --chown=1001:root . .
# build the docs
RUN chmod +x prepare_theme.sh && ./prepare_theme.sh
RUN mkdocs build
FROM nginxinc/nginx-unprivileged:1.26-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="Stakater Developer Handbook" \
maintainer="Stakater <hello@stakater.com>" \
vendor="Stakater" \
release="1" \
summary="Developer Handbook"
EXPOSE 8080:8080/tcp
CMD ["nginx", "-g", "daemon off;"]