37 lines
768 B
Docker
37 lines
768 B
Docker
FROM rockylinux/rockylinux:10
|
|
|
|
ENV container=docker
|
|
|
|
RUN dnf -y install epel-release \
|
|
&& crb enable \
|
|
&& dnf update -y \
|
|
&& dnf install -y sudo \
|
|
which \
|
|
hostname \
|
|
libyaml-devel \
|
|
python3 \
|
|
python3-pip \
|
|
python3-pyyaml \
|
|
rsync \
|
|
wget \
|
|
curl \
|
|
git \
|
|
ruby \
|
|
&& dnf clean all
|
|
|
|
RUN python3 -m pip install --no-cache-dir --upgrade pip \
|
|
&& pip3 install --no-cache-dir ansible
|
|
|
|
RUN ansible-galaxy collection install community.general && \
|
|
ansible-galaxy collection install ansible.posix && \
|
|
ansible-galaxy collection install community.docker && \
|
|
ansible-galaxy collection list
|
|
|
|
RUN mkdir -p /root/.ssh
|
|
|
|
# Disable requiretty.
|
|
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
|
|
|
CMD ["ansible-playbook"]
|
|
|