Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ RUN echo "=== YARN COPY DYNAMIC PLUGINS in $(pwd) ==="; "$YARN" copy-dynamic-plu

WORKDIR $CONTAINER_SOURCE

# Techdocs: Installing Python dependencies and building the techdocs venv.
# Prevents duplicating the same dependencies in the final minimal image.
# hadolint ignore=DL3013,DL3041,SC2086
RUN dnf install -y python3.11 python3.11-pip python3.11-devel 1>/dev/null 2>&1 && \
python3.11 -m venv /opt/techdocs-venv && \
/opt/techdocs-venv/bin/pip install --no-cache-dir --upgrade pip setuptools pyyaml && \
/opt/techdocs-venv/bin/pip install --no-cache-dir -r python/requirements.txt -r python/requirements-build.txt && \
/opt/techdocs-venv/bin/mkdocs --version && \
rm -rf python/ /opt/techdocs-venv/bin/pip && \
dnf clean all

# Stage 4 - Build the actual backend image and install production dependencies
# Upstream only
FROM skeleton AS cleanup
Expand Down Expand Up @@ -202,17 +213,6 @@ RUN \
npm config set registry=https://registry.npmjs.org/ && \
npm config set cafile /opt/app-root/src/registry-ca.pem

# Techdocs: Installing Python dependencies and building the techdocs venv.
# Prevents duplicating the same dependencies in the final minimal image.
# hadolint ignore=DL3013,DL3041,SC2086
RUN dnf install -y python3.11 python3.11-pip python3.11-devel 1>/dev/null 2>&1 && \
python3.11 -m venv /opt/techdocs-venv && \
/opt/techdocs-venv/bin/pip install --no-cache-dir --upgrade pip setuptools pyyaml && \
/opt/techdocs-venv/bin/pip install --no-cache-dir -r python/requirements.txt -r python/requirements-build.txt && \
/opt/techdocs-venv/bin/mkdocs --version && \
rm -rf python/ /opt/techdocs-venv/bin/pip && \
dnf clean all

# Stage 5 - Build the runner image
# https://registry.access.redhat.com/ubi9/nodejs-22-minimal
FROM registry.access.redhat.com/ubi9/nodejs-22-minimal:9.7-1776687829@sha256:dd18ba42af0e96abd00d2340a4e58a925acea8bbdce13ad011b42544e9174260 AS runner
Expand Down
Loading