-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile.ansible
33 lines (27 loc) · 1.19 KB
/
Dockerfile.ansible
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
FROM alpine:3.10.0
RUN apk add --no-cache --virtual build-dependencies \
gcc musl-dev libffi-dev openssl-dev python3-dev \
&& apk add --no-cache \
bash curl tar openssh-client sshpass git python3 py-boto py-dateutil \
py-httplib2 py-jinja2 py-paramiko py-pip ca-certificates docker \
&& python3 -m pip install --upgrade pip \
&& pip install python-keyczar
RUN DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} \
mkdir -p $DOCKER_CONFIG/cli-plugins
ADD https://github.com/docker/compose/releases/download/v2.25.0/docker-compose-linux-x86_64 $HOME/.docker/cli-plugins/docker-compose
RUN mkdir -p /etc/ansible /ansible/playbooks \
&& echo "[local]" >> /etc/ansible/hosts \
&& echo "localhost" >> /etc/ansible/hosts
WORKDIR /ansible/playbooks
ARG ANSIBLE_VERSION=2.11
ENV ANSIBLE_VERSION="${ANSIBLE_VERSION}" \
ANSIBLE_GATHERING=smart \
ANSIBLE_HOST_KEY_CHECKING=false \
ANSIBLE_RETRY_FILES_ENABLED=false \
ANSIBLE_ROLES_PATH=/ansible/playbooks/roles \
PYTHONPATH=/ansible/lib \
PATH=/ansible/bin:$PATH \
ANSIBLE_LIBRARY=/ansible/library
RUN pip install ansible=="${ANSIBLE_VERSION}" \
&& apk del build-dependencies
ENTRYPOINT ["/usr/bin/ansible-playbook"]