Skip to content

Commit 7037298

Browse files
puneetsharma21jiridanek
authored andcommitted
Add PDF builder stage support to Python 3.12 minimal image
Signed-off-by: puneetsharma21 <[email protected]>
1 parent e2582c1 commit 7037298

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
############################
2+
# Stage 1: PDF Tool Build #
3+
############################
4+
FROM registry.access.redhat.com/ubi9/python-312:latest AS pdf-builder
5+
6+
WORKDIR /opt/app-root/bin
7+
8+
# OS Packages needs to be installed as root
9+
USER 0
10+
11+
# Copy scripts
12+
COPY jupyter/utils/install_texlive.sh ./install_texlive.sh
13+
COPY jupyter/utils/install_pandoc.sh ./install_pandoc.sh
14+
RUN chmod +x install_texlive.sh install_pandoc.sh
15+
16+
RUN ./install_texlive.sh
17+
RUN ./install_pandoc.sh
18+
119
####################
220
# base #
321
####################
@@ -54,6 +72,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
5472

5573
USER 0
5674

75+
# Copy built TeXLive and Pandoc binaries only (no build deps)
76+
COPY --from=pdf-builder /usr/local/texlive /usr/local/texlive
77+
COPY --from=pdf-builder /usr/local/pandoc /usr/local/pandoc
78+
5779
# Dependencies for PDF export begin
5880
RUN ./utils/install_pdf_deps.sh
5981
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"

0 commit comments

Comments
 (0)