1 # Dockerfile for building Ansible 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 "===> Installing sudo to emulate normal OS behavior..." && \
16 apk --update add sudo && \
19 echo "===> Adding Python runtime..." && \
20 apk --update add python py-pip openssl ca-certificates && \
21 apk --update add --virtual build-dependencies \
22 python-dev libffi-dev openssl-dev build-base && \
23 pip install --upgrade pip cffi && \
26 echo "===> Installing Ansible..." && \
27 pip install ansible && \
30 echo "===> Installing handy tools (not absolutely required)..." && \
31 pip install --upgrade pywinrm && \
32 apk --update add sshpass openssh-client rsync && \
35 echo "===> Removing package list..." && \
36 apk del build-dependencies && \
37 rm -rf /var/cache/apk/* && \
40 echo "===> Adding hosts for convenience..." && \
41 mkdir -p /etc/ansible && \
42 echo 'localhost' > /etc/ansible/hosts
45 # default command: display Ansible version
46 CMD [ "ansible-playbook", "--version" ]