1 # Dockerfile for building Ansible 1.9 image for Alpine 3, with as few additional software as possible.
3 # @see https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md
12 MAINTAINER William Yeh <william.pjyeh@gmail.com>
15 RUN echo "===> Adding Python runtime..." && \
16 apk --update add python py-pip openssl ca-certificates && \
17 apk --update add --virtual build-dependencies \
18 python-dev libffi-dev openssl-dev build-base && \
19 pip install --upgrade pip cffi && \
22 echo "===> Installing Ansible..." && \
23 pip install ansible==1.9.4 && \
26 echo "===> Installing handy tools (not absolutely required)..." && \
27 apk --update add sshpass openssh-client && \
30 echo "===> Removing package list..." && \
31 apk del build-dependencies && \
32 rm -rf /var/cache/apk/* && \
35 echo "===> Adding hosts for convenience..." && \
36 mkdir -p /etc/ansible && \
37 echo 'localhost' > /etc/ansible/hosts
40 # default command: display Ansible version
41 CMD [ "ansible-playbook", "--version" ]