-
Notifications
You must be signed in to change notification settings - Fork 1
/
sphinx.dockerfile
61 lines (45 loc) · 1.06 KB
/
sphinx.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM python:3.11-alpine AS sphinx_min
COPY sphinx_ctx/min.txt /tmp/
RUN apk --no-cache -U upgrade && apk --no-cache add \
curl \
git \
make
# py3-virtualenv
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install wheel setuptools \
&& pip install -r /tmp/min.txt
WORKDIR /src
#---
FROM sphinx_min AS sphinx_base
COPY sphinx_ctx/base.txt /tmp/
RUN pip install -r /tmp/base.txt
#---
FROM sphinx_base AS sphinx_featured
COPY sphinx_ctx/featured.txt /tmp/
RUN apk add -U --no-cache \
gcc \
jpeg-dev \
libffi-dev \
libxml2-dev \
libxslt-dev \
linux-headers \
musl-dev \
zlib-dev
RUN pip install -r /tmp/featured.txt
#---
FROM sphinx_featured AS sphinx_pytooling
RUN apk add -U --no-cache graphviz
#---
FROM sphinx_featured AS sphinx_wavedrom
RUN apk add -U --no-cache \
cairo \
cairo-dev \
g++ \
libxcb-dev \
npm \
pango-dev \
pixman-dev
RUN npm i -g wavedrom-cli
RUN pip install sphinxcontrib-wavedrom