-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.Dockerfile
43 lines (39 loc) · 1.03 KB
/
source.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
39
40
41
42
43
FROM debian:9.4-slim
#install the build deps
RUN apt-get update -y && apt-get install -y make \
git \
make \
python-setuptools \
gcc \
python-dev \
libffi-dev \
libssl-dev \
python-packaging && \
rm -rf /var/lib/apt/lists/* && \
#build and install ansible
mkdir -p /ansible && \
cd /ansible/ && \
git clone git://github.com/ansible/ansible.git && \
cd /ansible/ansible && \
git checkout stable-2.7 && \
make && \
make install && \
rm -rf /ansible/ansible && \
#remove dev deps
apt-get remove -y git \
make \
gcc \
libffi-dev \
libssl-dev \
python-dev && \
apt-get autoremove -y
RUN mkdir -p /ansible/playbooks
WORKDIR /ansible/playbooks
ENV ANSIBLE_GATHERING smart
ENV ANSIBLE_HOST_KEY_CHECKING false
ENV ANSIBLE_RETRY_FILES_ENABLED false
ENV ANSIBLE_ROLES_PATH /ansible/playbooks/roles
ENV ANSIBLE_SSH_PIPELINING True
#ENTRYPOINT [ "/bin/bash" ]
ENTRYPOINT [ "ansible-playbook" ]
CMD [ "playbook.yml","-i","hosts","--private-key","~/.ssh/key"]