-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 961 Bytes
/
Dockerfile
File metadata and controls
37 lines (28 loc) · 961 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
36
37
# Start with a Python base image
FROM squidfunk/mkdocs-material
# set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONPYCACHEPREFIX=/root/.cache/pycache/
# Install Node.js and npm with caching
RUN \
--mount=type=cache,target=/var/cache/apk \
--mount=type=cache,target=/etc/apk/cache \
apk add nodejs npm build-base python3
WORKDIR /docs
# Copy package files and install dependencies with caching
COPY package.json .
RUN echo "Cache bust for npm install"
RUN npm install --save-dev
# Copy Python requirements and install
COPY requirements.txt .
RUN echo "Cache bust for pip install"
RUN pip install -r requirements.txt
# Copy the entire application
COPY . .
# Ensure entrypoint is executable
RUN chmod +x /docs/entrypoint.sh
# Expose the ports MkDocs will run on
EXPOSE 8000 35729
# Set the startup script as the entry point (run via sh to avoid exec bit issues)
ENTRYPOINT ["sh", "/docs/entrypoint.sh"]