]> git.immae.eu Git - github/fretlink/docker-ansible.git/blame - alpine3/Dockerfile
Add: `git` for onbuild variants; handy tools for others.
[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
13375974 10FROM alpine:3.4
ae06b63d
WY
11
12MAINTAINER William Yeh <william.pjyeh@gmail.com>
13
14
15RUN echo "===> Adding Python runtime..." && \
97d48efe
WY
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 && \
ae06b63d
WY
20 \
21 \
22 echo "===> Installing Ansible..." && \
23 pip install ansible && \
24 \
25 \
b1f3718d
WY
26 echo "===> Installing handy tools (not absolutely required)..." && \
27 apk --update add sshpass openssh-client && \
28 \
29 \
ae06b63d
WY
30 echo "===> Removing package list..." && \
31 apk del build-dependencies && \
32 rm -rf /var/cache/apk/* && \
33 \
34 \
35 echo "===> Adding hosts for convenience..." && \
36 mkdir -p /etc/ansible && \
7b2618d5 37 echo 'localhost' > /etc/ansible/hosts
ae06b63d
WY
38
39
40# default command: display Ansible version
41CMD [ "ansible-playbook", "--version" ]