72 lines
1.8 KiB
Docker
72 lines
1.8 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM python:3.10 as compile-sphinx5.3.0-base
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y python3-sphinx
|
|
RUN pip install Sphinx==5.3.0 pydata-sphinx-theme==0.12.0
|
|
WORKDIR /app/
|
|
RUN pip install git+https://gitea.parrrate.ru/PTV/rainbowadn.git@e9fba7b064902ceedee0dd5578cb47030665a6aa
|
|
|
|
RUN mkdir /app/docs/
|
|
|
|
|
|
FROM compile-sphinx5.3.0-base as compile-legacy
|
|
|
|
WORKDIR /app/legacy/
|
|
RUN git clone --branch 1.0 https://gitea.parrrate.ru/PTV/ptvp35.git
|
|
WORKDIR /app/legacy/ptvp35/
|
|
|
|
|
|
FROM compile-legacy as compile-1.0
|
|
|
|
RUN python traced_example.py > traced_example.txt
|
|
RUN python traced_example.py all > traced_example_all.txt
|
|
RUN cp -r docs/source/ ./source/
|
|
RUN cp docs/Makefile ./Makefile
|
|
RUN make html
|
|
|
|
|
|
FROM compile-legacy as compile-1.1rc0
|
|
|
|
RUN git fetch && git checkout 1.1rc0
|
|
WORKDIR /app/legacy/ptvp35/docs/
|
|
RUN make html
|
|
|
|
|
|
FROM compile-legacy as compile-1.1rc2
|
|
|
|
RUN git fetch && git checkout 1.1rc2
|
|
WORKDIR /app/legacy/ptvp35/docs/
|
|
RUN make html
|
|
|
|
|
|
FROM compile-legacy as compile-1.1.0
|
|
|
|
RUN git fetch && git checkout 1.1.0
|
|
WORKDIR /app/legacy/ptvp35/docs/
|
|
RUN make html
|
|
|
|
|
|
FROM compile-sphinx5.3.0-base as compile-latest
|
|
|
|
COPY docs/Makefile docs/Makefile
|
|
COPY setup.py setup.py
|
|
COPY docs/scripts docs/scripts
|
|
COPY ptvp35 ptvp35
|
|
COPY docs/source docs/source
|
|
WORKDIR /app/docs/
|
|
RUN make html
|
|
|
|
|
|
FROM node:19
|
|
|
|
RUN npm install -g http-server
|
|
WORKDIR /app/docs/build/html/
|
|
COPY --from=compile-1.0 /app/legacy/ptvp35/build/html/ /app/docs/build/html/1.0/
|
|
COPY --from=compile-1.1rc0 /app/legacy/ptvp35/docs/build/html/ /app/docs/build/html/1.1rc0/
|
|
COPY --from=compile-1.1rc2 /app/legacy/ptvp35/docs/build/html/ /app/docs/build/html/1.1rc2/
|
|
COPY --from=compile-1.1.0 /app/legacy/ptvp35/docs/build/html/ /app/docs/build/html/1.1.0/
|
|
COPY --from=compile-latest /app/docs/build/html/ /app/docs/build/html/
|
|
CMD [ "http-server", "-p", "80" ]
|