feat(rockylinux-9): add support
Some checks failed
Build / build-arch-linux (push) Has been cancelled
Build / build-rocky-linux-8 (push) Has been cancelled
Build / build-rocky-linux-9 (push) Has been cancelled
Lint Markdown files / markdown-lint (push) Has been cancelled

This commit is contained in:
2025-08-11 15:44:27 +02:00
parent 1a5d022476
commit 07795e86e8
4 changed files with 157 additions and 54 deletions

30
Dockerfile.rockylinux9 Normal file
View File

@ -0,0 +1,30 @@
FROM docker.io/library/rockylinux:9
RUN dnf update --assumeyes && \
dnf install --assumeyes bash-completion sudo && \
dnf install --assumeyes epel-release && \
dnf install --assumeyes ansible-core && \
dnf install --assumeyes python3.12 python3-boto3 python3-botocore && \
dnf remove --assumeyes epel-release && \
dnf clean all
# We must change python to 3.12 (default 3.9), to be compliant with ansible-core. Furthermore, we must upgrade pip to
# latest version. Otherwise is still used pip for python 3.9. At least, we install boto3, which is required for the aws
# dynamic inventory manually, because the official python-boto3 package is for python 3.9. At least, we install
# ansible-lint via pip to be able to lint ansible roles.
RUN ln --symbolic --force /usr/bin/python3.12 /usr/bin/python3 && \
curl --fail --silent --location https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \
python3 get-pip.py && \
pip install ansible-lint boto3
# Create default ansible inventory file
RUN mkdir --parents /etc/ansible
RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# Remove unnecessary getty and udev targets that result in high CPU usage when
# using multiple containers with molecule
# (https://github.com/ansible/molecule/issues/1104)
RUN rm --recursive --force /lib/systemd/system/systemd*udev* && \
rm --recursive --force /lib/systemd/system/getty.target
VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"]