Skip to content
Merged
Show file tree
Hide file tree
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 images/ansible-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# It is built with dependencies that take a while to download, thus speeding
# up ansible deploy jobs.

FROM registry.access.redhat.com/ubi9/ubi:9.6 AS basebuilder
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6 AS basebuilder

# Install Rust so that we can ensure backwards compatibility with installing/building the cryptography wheel across all platforms
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Expand All @@ -21,21 +21,21 @@ ENV PIP_NO_CACHE_DIR=1 \
PIPENV_CLEAR=1
# Ensure fresh metadata rather than cached metadata, install system and pip python deps,
# and remove those not needed at runtime.
RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
&& dnf update -y \
&& dnf install -y gcc libffi-devel openssl-devel python3.12-devel \
RUN set -e && microdnf clean all && rm -rf /var/cache/dnf/* \
&& microdnf update -y \
&& microdnf install -y gcc libffi-devel openssl-devel python3.12-devel \
&& pushd /usr/local/bin && ln -sf ../../bin/python3.12 python3 && popd \
&& python3 -m ensurepip --upgrade \
&& pip3 install --upgrade pip~=23.3.2 \
&& pip3 install pipenv==2023.11.15 \
&& pipenv install --deploy \
&& pip3 install ansible_runner_http/ \
&& pipenv check \
&& dnf remove -y gcc libffi-devel openssl-devel python3.12-devel \
&& dnf clean all \
&& microdnf remove -y gcc libffi-devel openssl-devel python3.12-devel \
&& microdnf clean all \
&& rm -rf /var/cache/dnf

FROM registry.access.redhat.com/ubi9/ubi:9.6 AS base
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6 AS base
ARG TARGETARCH

# Label this image with the repo and commit that built it, for freshmaking purposes.
Expand All @@ -48,10 +48,10 @@ RUN mkdir -p /etc/ansible \
&& echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \
&& echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg

RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
&& dnf update -y \
&& dnf install -y python3.12 \
&& dnf clean all \
RUN set -e && microdnf clean all && rm -rf /var/cache/dnf/* \
&& microdnf update -y \
&& microdnf install -y python3.12 \
&& microdnf clean all \
&& rm -rf /var/cache/dnf

COPY --from=basebuilder /usr/local/lib64/python3.12/site-packages /usr/local/lib64/python3.12/site-packages
Expand Down
Loading