ansible-docker/Dockerfile.rockylinux8

23 lines
941 B
Docker

FROM docker.io/library/rockylinux:8
RUN dnf update --assumeyes && \
dnf install --assumeyes bash-completion sudo && \
dnf install --assumeyes epel-release && \
dnf install --assumeyes ansible && \
dnf remove --assumeyes epel-release && \
dnf install --assumeyes 'dnf-command(config-manager)' && \
dnf config-manager --set-enabled ha && \
dnf install --assumeyes python3-boto3 python3-botocore && \
dnf clean all
# 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"]