1 # Dockerfile for building Ansible 1.9 image for Debian 7 (wheezy), with as few additional software as possible.
3 # @see https://launchpad.net/~ansible/+archive/ubuntu/ansible
12 MAINTAINER William Yeh <william.pjyeh@gmail.com>
15 RUN echo "===> Installing python, sudo, and supporting tools..." && \
16 apt-get update -y && apt-get install --fix-missing && \
17 DEBIAN_FRONTEND=noninteractive \
19 python python-yaml sudo \
20 curl gcc python-pip python-dev libffi-dev libssl-dev && \
21 pip install --upgrade cffi && \
24 echo "===> Installing Ansible..." && \
25 pip install ansible==1.9.4 && \
28 echo "===> Removing unused APT resources..." && \
29 apt-get -f -y --auto-remove remove \
30 gcc python-pip python-dev libffi-dev libssl-dev && \
32 rm -rf /var/lib/apt/lists/* /tmp/* && \
35 echo "===> Adding hosts for convenience..." && \
36 mkdir -p /etc/ansible && \
37 echo 'localhost' > /etc/ansible/hosts
40 COPY ansible-playbook-wrapper /usr/local/bin/
42 ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
43 echo "===> Updating TLS certificates..." && \
44 apt-get install -y openssl ca-certificates
49 echo "===> Diagnosis: host information..." && \
50 ansible -c local -m setup all
54 # default command: display Ansible version
55 CMD [ "ansible-playbook", "--version" ]