]> git.immae.eu Git - github/fretlink/docker-ansible.git/blame - 1.9-alpine3-onbuild/Dockerfile
Add: support for Ubuntu 16.04 LTS (Xenial).
[github/fretlink/docker-ansible.git] / 1.9-alpine3-onbuild / 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
10FROM alpine:3.3
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 && \
14e54a03
WY
20 \
21 \
22 echo "===> Installing Ansible..." && \
23 pip install ansible==1.9.4 && \
24 \
25 \
26 echo "===> Removing package list..." && \
27 apk del build-dependencies && \
28 rm -rf /var/cache/apk/* && \
29 \
30 \
31 echo "===> Adding hosts for convenience..." && \
32 mkdir -p /etc/ansible && \
33 echo 'localhost' > /etc/ansible/hosts
34
35
36COPY ansible-playbook-wrapper /usr/local/bin/
37
38
39ONBUILD WORKDIR /tmp
40ONBUILD COPY . /tmp
41ONBUILD RUN \
42 echo "===> Diagnosis: host information..." && \
43 ansible -c local -m setup all
44
45
46
47# default command: display Ansible version
48CMD [ "ansible-playbook", "--version" ]