-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
36 lines (33 loc) · 1.19 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
FROM python:3.8-alpine
RUN echo "===> Installing sudo to emulate normal OS behavior..." && \
apk --update add sudo && \
\
\
echo "===> Adding Packages runtime..." && \
apk --update add openssl ca-certificates bash curl git && \
apk --update add --virtual build-dependencies \
libffi-dev openssl-dev build-base && \
pip install --upgrade pip cffi cryptography==3.3.2 && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==2.9.22 && \
\
\
echo "===> Installing handy tools (not absolutely required)..." && \
pip install --upgrade pycrypto pywinrm && \
apk --update add sshpass openssh-client rsync && \
\
\
echo "===> Removing package list..." && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
\
\
echo "===> Adding hosts for convenience..." && \
mkdir -p /etc/ansible && \
echo 'localhost' > /etc/ansible/hosts
RUN mkdir -p /app
COPY . /app
# default command: display Ansible version
CMD [ "ansible", "--version" ]