2
2
# It is built with dependencies that take a while to download, thus speeding
3
3
# up ansible deploy jobs.
4
4
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
6
6
7
7
# Install Rust so that we can ensure backwards compatibility with installing/building the cryptography wheel across all platforms
8
8
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
@@ -21,21 +21,21 @@ ENV PIP_NO_CACHE_DIR=1 \
21
21
PIPENV_CLEAR=1
22
22
# Ensure fresh metadata rather than cached metadata, install system and pip python deps,
23
23
# 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 \
27
27
&& pushd /usr/local/bin && ln -sf ../../bin/python3.12 python3 && popd \
28
28
&& python3 -m ensurepip --upgrade \
29
29
&& pip3 install --upgrade pip~=23.3.2 \
30
30
&& pip3 install pipenv==2023.11.15 \
31
31
&& pipenv install --deploy \
32
32
&& pip3 install ansible_runner_http/ \
33
33
&& 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 \
36
36
&& rm -rf /var/cache/dnf
37
37
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
39
39
ARG TARGETARCH
40
40
41
41
# Label this image with the repo and commit that built it, for freshmaking purposes.
@@ -48,10 +48,10 @@ RUN mkdir -p /etc/ansible \
48
48
&& echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \
49
49
&& echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg
50
50
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 \
55
55
&& rm -rf /var/cache/dnf
56
56
57
57
COPY --from=basebuilder /usr/local/lib64/python3.12/site-packages /usr/local/lib64/python3.12/site-packages
0 commit comments