forked from psf/policies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (22 loc) · 741 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
FROM python:3.12.5-slim-bookworm as docs
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential git libcairo2-dev libfreetype6-dev \
libjpeg-dev libpng-dev libz-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
&& python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_NO_CACHE_DIR=1
RUN pip install --upgrade pip setuptools wheel
COPY requirements.txt /tmp/requirements.txt
RUN set -x \
&& pip install -r /tmp/requirements.txt \
&& pip check \
&& find /opt/venv -name '*.pyc' -delete
WORKDIR /opt/venv/src/
COPY mkdocs.yml /opt/venv/src/mkdocs.yml
COPY docs /opt/venv/src/docs