forked from geerlingguy/docker-fedora32-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (33 loc) · 764 Bytes
/
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
29
30
31
32
33
34
35
36
37
38
FROM archlinux:latest as build
LABEL maintainer="Gregor Bückendorf"
ENV container=docker
# Install requirements
RUN pacman \
--sync \
--refresh \
--sysupgrade \
--noconfirm \
--noprogressbar \
--needed \
python \
python-pipx \
sudo \
which \
inetutils \
&& (yes | head --lines=2; yes n) | \
pacman \
--sync \
--clean \
--clean \
&& rm -rf /var/lib/pacman/sync/*
# Install Ansible via Pip
ENV PATH="/root/.local/bin:${PATH}"
RUN pipx install --include-deps ansible
# Install Ansible inventory file
RUN mkdir -p /etc/ansible
COPY hosts /etc/ansible/
VOLUME ["/sys/fs/cgroup"]
CMD ["/usr/lib/systemd/systemd"]
FROM build as test
COPY test .
RUN ansible-playbook site.yml