diff options
Diffstat (limited to 'alpine3')
-rw-r--r-- | alpine3/Dockerfile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/alpine3/Dockerfile b/alpine3/Dockerfile new file mode 100644 index 0000000..04efa90 --- /dev/null +++ b/alpine3/Dockerfile | |||
@@ -0,0 +1,36 @@ | |||
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.2 | ||
11 | |||
12 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | ||
13 | |||
14 | |||
15 | RUN echo "===> Adding Python runtime..." && \ | ||
16 | apk --update add python py-pip openssl ca-certificates && \ | ||
17 | apk --update add --virtual build-dependencies python-dev build-base && \ | ||
18 | pip install --upgrade pip && \ | ||
19 | \ | ||
20 | \ | ||
21 | echo "===> Installing Ansible..." && \ | ||
22 | pip install ansible && \ | ||
23 | \ | ||
24 | \ | ||
25 | echo "===> Removing package list..." && \ | ||
26 | apk del build-dependencies && \ | ||
27 | rm -rf /var/cache/apk/* && \ | ||
28 | \ | ||
29 | \ | ||
30 | echo "===> Adding hosts for convenience..." && \ | ||
31 | mkdir -p /etc/ansible && \ | ||
32 | echo '[local]\nlocalhost\n' > /etc/ansible/hosts | ||
33 | |||
34 | |||
35 | # default command: display Ansible version | ||
36 | CMD [ "ansible-playbook", "--version" ] | ||