ansible-docker/ansible.Dockerfile
Adrien Reslinger bca3f9b9c4
All checks were successful
continuous-integration/drone/push Build is passing
Remove binary&collections as we can take from host
2021-10-03 00:00:12 +02:00

38 lines
No EOL
1.7 KiB
Docker

# docker build -f ansible.Dockerfile -t adrien/ansible ./
FROM python:3.8-alpine
LABEL name="ansible" \
version="latest"
ENV ANSIBLE_GATHERING=smart \
ANSIBLE_HOST_KEY_CHECKING=false \
ANSIBLE_RETRY_FILES_ENABLED=false \
ANSIBLE_ROLES_PATH=/ansible/playbooks/roles \
ANSIBLE_SSH_PIPELINING=True \
PYTHONPATH=/ansible/lib \
PATH=/ansible/bin:$PATH \
ANSIBLE_LIBRARY=/ansible/library
WORKDIR /ansible/playbooks
RUN apk --no-cache --update add ca-certificates bash curl openssh-client openssl gettext libpq git && \
# apk --no-cache upgrade && \
ln -s /usr/local/bin/python3 /usr/bin/python3
RUN apk --update add --virtual build-dependencies gcc rust cargo musl-dev libffi-dev openssl-dev build-base libvirt-dev postgresql-dev && \
pip3 install ansible asn1crypto bcrypt cachetools certifi cffi chardet cryptography dictdiffer \
docker-py google-auth httplib2 hvac idna ipaddress Jinja2 jmespath jsonpatch jsonpointer jsonschema \
kubernetes libvirt-python MarkupSafe oauthlib openshift paramiko pyasn1 pyasn1-modules pycparser \
PyNaCl python-dateutil python-string-utils PyYAML q requests requests-oauthlib rsa ruamel.yaml \
six simplejson urllib3 websocket-client ansible-lint ovh openstacksdk cs && \
# python-swiftclient boto boto3 psycopg2 ansible-modules-hashivault && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
mkdir -p /etc/ansible /ansible && \
echo "[local]" >> /etc/ansible/hosts && \
echo "localhost" >> /etc/ansible/hosts
#RUN update-ca-certificates
#RUN ansible-galaxy collection install kubernetes.core ansible.posix community.general community.libvirt ngine_io.cloudstack google.cloud community.digitalocean
CMD ["ansible"]