]> git.immae.eu Git - github/fretlink/docker-ansible.git/blob - alpine3/Dockerfile
alpine3: update base alpine image from 3.6 to 3.7
[github/fretlink/docker-ansible.git] / alpine3 / Dockerfile
1 # Dockerfile for building Ansible image for Alpine 3, with as few additional software as possible.
2 #
3 # @see https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md
4 #
5 # Version 1.0
6 #
7
8
9 # pull base image
10 FROM alpine:3.7
11
12 MAINTAINER William Yeh <william.pjyeh@gmail.com>
13
14
15 RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
16 apk --update add sudo && \
17 \
18 \
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 && \
24 \
25 \
26 echo "===> Installing Ansible..." && \
27 pip install ansible && \
28 \
29 \
30 echo "===> Installing handy tools (not absolutely required)..." && \
31 pip install --upgrade pywinrm && \
32 apk --update add sshpass openssh-client rsync && \
33 \
34 \
35 echo "===> Removing package list..." && \
36 apk del build-dependencies && \
37 rm -rf /var/cache/apk/* && \
38 \
39 \
40 echo "===> Adding hosts for convenience..." && \
41 mkdir -p /etc/ansible && \
42 echo 'localhost' > /etc/ansible/hosts
43
44
45 # default command: display Ansible version
46 CMD [ "ansible-playbook", "--version" ]