0
0
docker-images/dockerfiles/ansible.Dockerfile
2023-11-16 16:35:31 +08:00

45 lines
955 B
Docker
Executable File

FROM python:slim
LABEL maintainer="opnxng" \
org.label-schema.description="Ansible inside Docker"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
openssh-client \
sshpass \
locales \
sshpass \
bash \
git \
curl \
rsync \
zsh \
nano \
sudo \
less \
gcc \
python3-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man
RUN pip3 install --no-cache-dir \
ansible \
passlib \
ara \
hvac \
dnspython \
jmespath \
"hvac[parser]" \
certifi \
ansible-lint \
ansible-modules-hashivault && \
rm -rf /root/.cache/pip
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
RUN locale-gen en_US.UTF-8
ENV ANSIBLE_FORCE_COLOR true