]> git.immae.eu Git - github/fretlink/docker-ansible.git/blame - alpine3/Dockerfile
debian9: use "slim" version of debian image
[github/fretlink/docker-ansible.git] / alpine3 / Dockerfile
CommitLineData
ae06b63d
WY
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
236e43be 10FROM alpine:3.7
ae06b63d
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 && \
ae06b63d
WY
24 \
25 \
26 echo "===> Installing Ansible..." && \
27 pip install ansible && \
28 \
29 \
b1f3718d 30 echo "===> Installing handy tools (not absolutely required)..." && \
57d366d7 31 pip install --upgrade pywinrm && \
7d885c87 32 apk --update add sshpass openssh-client rsync && \
b1f3718d
WY
33 \
34 \
ae06b63d
WY
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 && \
7b2618d5 42 echo 'localhost' > /etc/ansible/hosts
ae06b63d
WY
43
44
45# default command: display Ansible version
46CMD [ "ansible-playbook", "--version" ]