FROM sphinxdoc/sphinx AS build
RUN pip install myst-parser
COPY book/ /book
WORKDIR /book
RUN make html
RUN make epub

FROM scratch
COPY --from=build /book/build/html /
COPY --from=build /book/build/epub/OpenPGPforapplicationdevelopers.epub /