-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 876 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 876 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
31
32
33
34
35
FROM python:3.11.0-alpine3.15
# Make target platform available
ARG TARGETPLATFORM
# Build-time flags
ARG WITH_PLUGINS=true
# Copy files necessary installation
COPY requirements.txt requirements.txt
COPY requirements-plugins.txt requirements-plugins.txt
# Needed for native module builds
RUN apk add build-base git && \
if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
apk add libxml2-dev libxslt-dev; \
fi
# Perform mkdocs-material installation
RUN pip install --no-cache-dir -U pip
RUN pip install --no-cache-dir -r requirements.txt \
&& \
if [ "${WITH_PLUGINS}" = "true" ]; then \
pip install --no-cache-dir -r requirements-plugins.txt; \
fi
# Set working directory
WORKDIR /docs
# Expose MkDocs development server port
EXPOSE 8000
# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]