forked from adrienbrignon/mkdocs-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (34 loc) · 881 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
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM docker.io/ubuntu:22.04 as base
WORKDIR /usr/src/app
ENV PYTHONFAULTHANDLER=1 \
PYTHONHASHSEED=random \
PYTHONUNBUFFERED=1
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
g++ \
gcc \
git \
python3 \
python3-venv \
gnupg2 \
libffi-dev \
make \
wget \
&& rm -rf /var/lib/apt/lists/*
FROM base as builder
ENV POETRY_VERSION=1.8.3 \
PIP_NO_CACHE_DIR=1 \
PIP_DEFAULT_TIMEOUT=100 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN python3 -m venv .venv
COPY mkdocs_exporter/ mkdocs_exporter/
COPY pyproject.toml poetry.lock Makefile README.md ./
RUN . .venv/bin/activate \
&& pip install poetry \
&& make install \
&& playwright install chrome
COPY . .
RUN . .venv/bin/activate \
&& make build
FROM docker.io/nginx:1.27.0
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html