forked from geerlingguy/docker-debian9-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (24 loc) · 936 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
FROM debian:stretch
LABEL maintainer="Jeff Geerling"
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sudo systemd \
&& rm -rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
&& apt-get clean
# Install Ansible via pip.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential libffi-dev libssl-dev \
python-pip python-dev python-setuptools python-wheel \
&& rm -rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
&& apt-get clean
RUN pip install ansible cryptography
COPY initctl_faker .
RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
# Install Ansible inventory file
RUN mkdir -p /etc/ansible \
&& echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts