From 02c7b04cfd2fb58a96777a521f039f42c4ba3ef9 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 24 Nov 2023 12:49:20 +0100 Subject: [PATCH] Adapt Containerfile to build with a patched version of sphinx Sphinx >= 7.1.0 has issues rendering EPUBs correctly. Install latest sphinx and apply a patch to fix EPUB rendering. Signed-off-by: David Runge --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3941373..24aadea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ # SPDX-FileCopyrightText: 2023 The "Notes on OpenPGP" project # SPDX-License-Identifier: CC0-1.0 -FROM sphinxdoc/sphinx AS build -RUN pip install myst-parser +FROM archlinux:latest AS build COPY book/ /book WORKDIR /book -RUN make html -RUN make epub +# fix EPUB rendering: https://github.com/sphinx-doc/sphinx/issues/11598 +RUN \ + pacman -Sy --needed --noconfirm archlinux-keyring \ + && pacman -Syu --needed --noconfirm epubcheck make patch python-myst-parser python-sphinx \ + && patch -Np1 -d /usr/lib/python3.11/site-packages/ -i /book/patches/sphinx-11766.patch \ + && make epub html FROM scratch COPY --from=build /book/build/html / -COPY --from=build /book/build/epub/OpenPGPforapplicationdevelopers.epub / \ No newline at end of file +COPY --from=build /book/build/epub/OpenPGPforapplicationdevelopers.epub /