All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 8s
Signed-off-by: Basil Bruhn <basil.bruhn@psi.ch>
1.0 KiB
1.0 KiB
Docker
Dockerfiles
# Start with a minimal Python base image
FROM python:3.12-alpine
# Install dependencies
# Jeder Step (RUN befehl) generiert ein neuer image layer!
RUN apk add --no-cache git bash nodejs\
&& pip install --no-cache-dir \
mkdocs \
mkdocs-material \
mkdocs-mermaid2-plugin \
mkdocs-git-revision-date-localized-plugin \
mkdocs-macros-plugin
# Set work directory
# Environment variables -> Lookup :)
WORKDIR /site
# Default command
ENTRYPOINT ["mkdocs"]
Altenative
FROM alpine
# 1. Install Python 3, pip and build tools (needed for packages with C extensions)
RUN apk --no-cache add\
python3 \
py3-pip \
git \
nodejs
# 2. Install the Python packages
RUN python3 -m venv /opt/python-env
RUN /opt/python-env/bin/python3 -m pip install --upgrade pip
RUN /opt/python-env/bin/pip install --no-cache-dir \
mkdocs-material \
mkdocs-awesome-pages-plugin
# 3. (Optional) Clean up if you added any temporary files
RUN rm -rf /var/cache/apk/*