forked from pad92/docker-ansible-alpine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
65 lines (57 loc) · 1.57 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM alpine:3.6
# Metadata params
ARG BUILD_DATE
ARG VERSION=2.4.2.0
ARG VCS_REF
# Metadata
LABEL maintainer="Pascal A. <[email protected]>" \
org.label-schema.url="https://github.com/pad92/docker-ansible-alpine/blob/master/README.md" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VERSION \
org.label-schema.vcs-url="https://github.com/pad92/docker-ansible-alpine.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.description="Ansible on alpine docker image" \
org.label-schema.schema-version="1.0"
RUN apk --update add \
python \
py-pip \
openssl \
ca-certificates \
git \
less \
openssl \
openssh-client \
p7zip \
py-lxml \
rsync \
sshpass \
sudo \
subversion \
zip \
&& apk --update add --virtual \
.build-deps \
python-dev \
libffi-dev \
openssl-dev \
build-base \
&& pip install --upgrade \
pip \
cffi \
&& pip install \
ansible==${VERSION} \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/*
RUN mkdir -p /etc/ansible \
&& echo 'localhost' > /etc/ansible/hosts \
&& echo -e """\
\n\
Host *\n\
StrictHostKeyChecking no\n\
UserKnownHostsFile=/dev/null\n\
""" >> /etc/ssh/ssh_config
COPY entrypoint /usr/local/bin/
WORKDIR /ansible
ENTRYPOINT ["entrypoint"]
# default command: display Ansible version
CMD [ "ansible-playbook", "--version" ]