forked from myriadrf/LimeSuiteNG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerateDocumentation.Dockerfile
50 lines (39 loc) · 1.25 KB
/
GenerateDocumentation.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
# Build the same version of Doxygen as it is in Netlify
FROM gcc:13 AS doxygen-build
WORKDIR /doxygen
RUN apt update && \
apt-get install -y --no-install-recommends \
cmake \
flex \
bison \
&& \
rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/doxygen/doxygen.git
WORKDIR /doxygen/doxygen
RUN git checkout Release_1_8_17
RUN cmake -G "Unix Makefiles" -B build .
RUN make -C build --no-print-directory -j$(nproc) install
FROM python:3.8-bookworm AS build-stage
WORKDIR /documentation
RUN apt update && \
apt-get install -y --no-install-recommends \
cmake \
libusb-1.0-0-dev \
&& \
rm -rf /var/lib/apt/lists/*
COPY docs/requirements.txt docs/requirements.txt
RUN pip install -r docs/requirements.txt
COPY external/ external/
COPY cmake/ cmake/
COPY udev-rules/ udev-rules/
COPY plugins/ plugins/
COPY Changelog.txt Changelog.txt
COPY CMakeLists.txt CMakeLists.txt
COPY src/ src/
COPY docs/ docs/
COPY --from=doxygen-build /usr/local/bin/doxygen /usr/bin/doxygen
COPY --from=doxygen-build /usr/local/lib64/libstdc++.so /lib/x86_64-linux-gnu/libstdc++.so.6
WORKDIR /documentation/docs
RUN ./generate_docs.sh
FROM scratch AS export-stage
COPY --from=build-stage /documentation/docs/_build/html /