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/ubi8 /ubi:8.9-1107 AS basebuilder
5+ FROM registry.access.redhat.com/ubi9 /ubi:9.4-1214.1726694543 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
@@ -19,9 +19,11 @@ ENV PIP_NO_CACHE_DIR=1 \
1919 PIPENV_CLEAR=1
2020# Ensure fresh metadata rather than cached metadata, install system and pip python deps,
2121# and remove those not needed at runtime.
22- RUN set -e && yum clean all && rm -rf /var/cache/yum/* \
23- && yum update -y \
24- && yum install -y libffi-devel openssl-devel python39-devel gcc python39-pip python39-setuptools \
22+ RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
23+ && dnf update -y \
24+ && dnf install -y gcc libffi-devel openssl-devel python3.12-devel \
25+ && pushd /usr/local/bin && ln -sf ../../bin/python3.12 python3 && popd \
26+ && python3 -m ensurepip --upgrade \
2527 && pip3 install --upgrade pip~=23.3.2 \
2628 && pip3 install pipenv==2023.11.15 \
2729 && pipenv install --deploy \
@@ -34,11 +36,11 @@ RUN set -e && yum clean all && rm -rf /var/cache/yum/* \
3436 # but the upgraded version doesn't support the use case (protocol we are using).\
3537 # Ref: https://github.com/operator-framework/ansible-operator-plugins/pull/67#issuecomment-2189164688
3638 && pipenv check --ignore 70612 --ignore 71064 \
37- && yum remove -y gcc libffi-devel openssl-devel python39 -devel \
38- && yum clean all \
39- && rm -rf /var/cache/yum
39+ && dnf remove -y gcc libffi-devel openssl-devel python3.12 -devel \
40+ && dnf clean all \
41+ && rm -rf /var/cache/dnf
4042
41- FROM registry.access.redhat.com/ubi8 /ubi:8.9-1107 as base
43+ FROM registry.access.redhat.com/ubi9 /ubi:9.4-1214.1726694543 as base
4244ARG TARGETARCH
4345
4446# Label this image with the repo and commit that built it, for freshmaking purposes.
@@ -51,16 +53,14 @@ RUN mkdir -p /etc/ansible \
5153 && echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \
5254 && echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg
5355
54- RUN set -e && yum clean all && rm -rf /var/cache/yum/* \
55- && yum update -y \
56- && yum install -y python39-pip python39-setuptools \
57- && pip3 install --upgrade pip~=23.3.2 \
58- && pip3 install pipenv==2023.11.15 \
59- && yum clean all \
60- && rm -rf /var/cache/yum
56+ RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
57+ && dnf update -y \
58+ && dnf install -y python3.12 \
59+ && dnf clean all \
60+ && rm -rf /var/cache/dnf
6161
62- COPY --from=basebuilder /usr/local/lib64/python3.9 /site-packages /usr/local/lib64/python3.9 /site-packages
63- COPY --from=basebuilder /usr/local/lib/python3.9 /site-packages /usr/local/lib/python3.9 /site-packages
62+ COPY --from=basebuilder /usr/local/lib64/python3.12 /site-packages /usr/local/lib64/python3.12 /site-packages
63+ COPY --from=basebuilder /usr/local/lib/python3.12 /site-packages /usr/local/lib/python3.12 /site-packages
6464COPY --from=basebuilder /usr/local/bin /usr/local/bin
6565
6666ENV TINI_VERSION=v0.19.0
0 commit comments