2023-01-10 16:31:58 +00:00
|
|
|
FROM docker.io/library/archlinux:latest
|
|
|
|
|
|
|
|
RUN pacman --sync --sysupgrade --refresh --noconfirm && \
|
|
|
|
pacman --sync --noconfirm \
|
2023-02-08 18:32:20 +00:00
|
|
|
ansible \
|
|
|
|
ansible-lint \
|
2023-01-10 16:31:58 +00:00
|
|
|
base-devel \
|
|
|
|
libffi \
|
|
|
|
openssl \
|
|
|
|
libyaml \
|
|
|
|
python \
|
|
|
|
python-setuptools \
|
|
|
|
python-pip \
|
2023-02-08 20:03:44 +00:00
|
|
|
python-pytest \
|
2023-01-10 16:31:58 +00:00
|
|
|
python-yaml \
|
2023-02-14 17:37:59 +00:00
|
|
|
sshpass \
|
2023-01-10 16:31:58 +00:00
|
|
|
systemd \
|
|
|
|
sudo \
|
|
|
|
iproute2 && \
|
|
|
|
rm --recursive --force /usr/share/doc && \
|
2023-06-08 16:31:43 +00:00
|
|
|
rm --recursive --force /usr/share/man && \
|
|
|
|
rm --recursive --force /var/cache/pacman/pkg
|
2023-01-10 16:31:58 +00:00
|
|
|
|
|
|
|
# Fix potential UTF-8 errors with ansible-test
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
|
|
|
|
|
|
# COPY initctl_faker .
|
|
|
|
# RUN chmod +x initctl_faker && \
|
|
|
|
# rm --recursive --force /sbin/initctl && \
|
|
|
|
# ln --symbolic /initctl_faker /sbin/initctl
|
|
|
|
|
|
|
|
# Install Ansible inventory file
|
|
|
|
RUN mkdir --parents /etc/ansible
|
|
|
|
RUN echo "[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"]
|
|
|
|
CMD [ "/lib/systemd/systemd" ]
|