22# It is built with dependencies that take a while to download, thus speeding
33# up ansible deploy jobs.
44
5- FROM registry.access.redhat.com/ubi9/ubi:9.6 AS basebuilder
5+ FROM registry.access.redhat.com/ubi9/ubi-minimal :9.6 AS basebuilder
66
77# Install Rust so that we can ensure backwards compatibility with installing/building the cryptography wheel across all platforms
88RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
@@ -21,21 +21,21 @@ ENV PIP_NO_CACHE_DIR=1 \
2121 PIPENV_CLEAR=1
2222# Ensure fresh metadata rather than cached metadata, install system and pip python deps,
2323# and remove those not needed at runtime.
24- RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
25- && dnf update -y \
26- && dnf install -y gcc libffi-devel openssl-devel python3.12-devel \
24+ RUN set -e && microdnf clean all && rm -rf /var/cache/dnf/* \
25+ && microdnf update -y \
26+ && microdnf install -y gcc libffi-devel openssl-devel python3.12-devel \
2727 && pushd /usr/local/bin && ln -sf ../../bin/python3.12 python3 && popd \
2828 && python3 -m ensurepip --upgrade \
2929 && pip3 install --upgrade pip~=23.3.2 \
3030 && pip3 install pipenv==2023.11.15 \
3131 && pipenv install --deploy \
3232 && pip3 install ansible_runner_http/ \
3333 && pipenv check \
34- && dnf remove -y gcc libffi-devel openssl-devel python3.12-devel \
35- && dnf clean all \
34+ && microdnf remove -y gcc libffi-devel openssl-devel python3.12-devel \
35+ && microdnf clean all \
3636 && rm -rf /var/cache/dnf
3737
38- FROM registry.access.redhat.com/ubi9/ubi:9.6 AS base
38+ FROM registry.access.redhat.com/ubi9/ubi-minimal :9.6 AS base
3939ARG TARGETARCH
4040
4141# Label this image with the repo and commit that built it, for freshmaking purposes.
@@ -48,10 +48,10 @@ RUN mkdir -p /etc/ansible \
4848 && echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \
4949 && echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg
5050
51- RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
52- && dnf update -y \
53- && dnf install -y python3.12 \
54- && dnf clean all \
51+ RUN set -e && microdnf clean all && rm -rf /var/cache/dnf/* \
52+ && microdnf update -y \
53+ && microdnf install -y python3.12 \
54+ && microdnf clean all \
5555 && rm -rf /var/cache/dnf
5656
5757COPY --from=basebuilder /usr/local/lib64/python3.12/site-packages /usr/local/lib64/python3.12/site-packages
0 commit comments