-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
34 lines (25 loc) · 994 Bytes
/
Dockerfile
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
# Setup Python dependencies
ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-slim-bullseye
# Update package lists and upgrade installed packages
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y git curl libcairo2 && \
# Debian packages are way too old to be relied upon here
# hence turning to Python:
pip install --upgrade pip
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install MkDocs and any additional requirements
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# this is needed to run mkdocs author plugin. But it will not be syncronized to our git repository at outside of container.
# so authors will not be shown when we use Docker to write documentation.
RUN git init
ENV HOST=0.0.0.0
ENV PORT=8000
ENV SITE_URL=http://${HOST}:${PORT}
ENV EDIT_URL=https://github.com/undp-data/geohub/blob/develop/documentation/docs
EXPOSE $PORT
# Serving locally
CMD mkdocs serve -a ${HOST}:${PORT}