From 8044e5941e286214a108dd3e92557acfbda9f81c Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Thu, 8 May 2025 11:58:15 +0200 Subject: [PATCH] fix(rockylinux-8): upgrade python, pip and boto3 --- Dockerfile.rockylinux8 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile.rockylinux8 b/Dockerfile.rockylinux8 index 756ccae..5884a59 100644 --- a/Dockerfile.rockylinux8 +++ b/Dockerfile.rockylinux8 @@ -10,6 +10,14 @@ RUN dnf update --assumeyes && \ dnf install --assumeyes python3-boto3 python3-botocore && \ dnf clean all +# We must change python to 3.12 (default 3.6), to be compliant with ansible-core. Furthermore, we must upgrade pip to +# latest version. Otherwise is still used pip for python 3.6. At least, we install boto3, which is required for the aws +# dynamic inventory manually, because the official python-boto3 package is for python 3.6. +RUN alternatives --set python3 /usr/bin/python3.12 && \ + curl --fail --silent --location https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \ + python3 get-pip.py && \ + pip install boto3 + # Create default ansible inventory file RUN mkdir --parents /etc/ansible RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts