-
Notifications
You must be signed in to change notification settings - Fork 78
/
Dockerfile
41 lines (35 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
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM gliderlabs/alpine:3.4
ARG VERSION=2.7.2
RUN \
apk-install \
curl \
openssh-client \
python \
py-boto \
py-dateutil \
py-httplib2 \
py-jinja2 \
py-paramiko \
py-pip \
py-setuptools \
py-yaml \
tar && \
pip install --upgrade pip python-keyczar && \
rm -rf /var/cache/apk/*
RUN mkdir /etc/ansible/ /ansible
RUN echo "[local]" >> /etc/ansible/hosts && \
echo "localhost" >> /etc/ansible/hosts
RUN \
curl -fsSL https://releases.ansible.com/ansible/ansible-${VERSION}.tar.gz -o ansible.tar.gz && \
tar -xzf ansible.tar.gz -C ansible --strip-components 1 && \
rm -fr ansible.tar.gz /ansible/docs /ansible/examples /ansible/packaging
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
ENV PATH /ansible/bin:$PATH
ENV PYTHONPATH /ansible/lib
ENTRYPOINT ["ansible-playbook"]