Skip to content

Commit c32a635

Browse files
puneetsharma21jiridanek
authored andcommitted
Add PDF builder stage support to Python 3.12 minimal image
Signed-off-by: puneetsharma21 <[email protected]> # Conflicts: # jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu
1 parent feaa9ad commit c32a635

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
#########################
44
ARG BASE_IMAGE
55

6+
############################
7+
# Stage 1: PDF Tool Build #
8+
############################
9+
# e.g., registry.access.redhat.com/ubi9/python-312:latest
10+
FROM ${BASE_IMAGE} AS pdf-builder
11+
12+
WORKDIR /opt/app-root/bin
13+
14+
# OS Packages needs to be installed as root
15+
USER 0
16+
17+
# Copy scripts
18+
COPY jupyter/utils/install_texlive.sh ./install_texlive.sh
19+
COPY jupyter/utils/install_pandoc.sh ./install_pandoc.sh
20+
RUN chmod +x install_texlive.sh install_pandoc.sh
21+
22+
RUN ./install_texlive.sh
23+
RUN ./install_pandoc.sh
24+
625
####################
726
# cpu-base #
827
####################
@@ -59,6 +78,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
5978

6079
USER 0
6180

81+
# Copy built TeXLive and Pandoc binaries only (no build deps)
82+
COPY --from=pdf-builder /usr/local/texlive /usr/local/texlive
83+
COPY --from=pdf-builder /usr/local/pandoc /usr/local/pandoc
84+
6285
# Dependencies for PDF export begin
6386
RUN ./utils/install_pdf_deps.sh
6487
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"

0 commit comments

Comments
 (0)