]> git.immae.eu Git - github/fretlink/docker-ansible.git/blame - 1.9-alpine3/Dockerfile
debian9: use "slim" version of debian image
[github/fretlink/docker-ansible.git] / 1.9-alpine3 / Dockerfile
CommitLineData
14e54a03
WY
1# Dockerfile for building Ansible 1.9 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
57d366d7 10FROM alpine:3.6
14e54a03
WY
11
12MAINTAINER William Yeh <william.pjyeh@gmail.com>
13
14
091f78b5
WY
15RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
16 apk --update add sudo && \
17 \
18 \
19 echo "===> Adding Python runtime..." && \
97d48efe
WY
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 && \
14e54a03
WY
24 \
25 \
26 echo "===> Installing Ansible..." && \
27 pip install ansible==1.9.4 && \
28 \
29 \
b1f3718d 30 echo "===> Installing handy tools (not absolutely required)..." && \
7d885c87 31 apk --update add sshpass openssh-client rsync && \
b1f3718d
WY
32 \
33 \
14e54a03
WY
34 echo "===> Removing package list..." && \
35 apk del build-dependencies && \
36 rm -rf /var/cache/apk/* && \
37 \
38 \
39 echo "===> Adding hosts for convenience..." && \
40 mkdir -p /etc/ansible && \
41 echo 'localhost' > /etc/ansible/hosts
42
43
44# default command: display Ansible version
45CMD [ "ansible-playbook", "--version" ]