-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (23 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM --platform=linux/amd64 ubuntu:20.04
ENV ANSIBLE_HOST_KEY_CHECKING False
RUN apt update \
&& apt install -y gnupg wget software-properties-common \
&& apt-add-repository ppa:ansible/ansible \
&& wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
tee /usr/share/keyrings/hashicorp-archive-keyring.gpg \
&& gpg --no-default-keyring \
--keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \
--fingerprint \
&& echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com/ $(lsb_release -cs) main" | \
tee /etc/apt/sources.list.d/hashicorp.list \
&& apt update \
&& apt install -y ansible terraform \
&& apt install -y libvirt-clients \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
RUN echo "[defaults]" >> /etc/ansible/ansible.cfg \
&& echo "pipelining = True\n" >> /etc/ansible/ansible.cfg
RUN ansible-galaxy collection install community.general
CMD /bin/bash