-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.docs
47 lines (39 loc) · 1.19 KB
/
Dockerfile.docs
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 sphinxdoc/sphinx-latexpdf:4.1.2 AS builder
# Downgrade docutils to 0.16 because of this issue:
# https://stackoverflow.com/questions/67542699/readthedocs-sphinx-not-rendering-bullet-list-from-rst-file
RUN python3 -m pip install --no-cache-dir docutils==0.16
RUN python3 -m pip install --no-cache-dir \
breathe \
exhale \
t3SphinxThemeRtd \
m2r2 \
sphinxcontrib-programoutput \
cloud_sptheme
RUN apt update \
&& apt install --no-install-recommends -y \
g++ \
cmake \
ninja-build \
`# for documentation` \
doxygen \
`# for tool sponge` \
moreutils \
`# for tool hxremove` \
html-xml-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root
COPY CMakeModules/ CMakeModules/
COPY CMakeLists.txt .
COPY README.md .
COPY docs/ docs/
COPY src/ src/
RUN rm -rf build/ \
&& mkdir build/ \
&& echo "Test" \
&& cmake -Bbuild -H. -GNinja \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install \
-DBUILD_LIBRARY=OFF -DBUILD_DOCS=ON \
&& ninja -C build install
FROM nginx
COPY --from=builder /root/install/doc/html /usr/share/nginx/html
COPY --from=builder /root/install/doc/os-matcher.pdf /usr/share/nginx/html/os-matcher.pdf