From 020ca706609f85788e4487d3e18f2c9acf0b8ab7 Mon Sep 17 00:00:00 2001 From: reza Date: Tue, 2 Nov 2021 14:52:01 +0330 Subject: [PATCH] ansible dockerfile --- ansible/Dockerfile | 20 ++++++++++++++++++++ ansible/README.md | 15 +++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ansible/Dockerfile create mode 100644 ansible/README.md diff --git a/ansible/Dockerfile b/ansible/Dockerfile new file mode 100644 index 0000000..93ddd0e --- /dev/null +++ b/ansible/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:20.04 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get install -y gcc python-dev libkrb5-dev && \ + apt-get install python3-pip -y && \ + pip3 install --upgrade pip && \ + pip3 install --upgrade virtualenv && \ + pip3 install pywinrm[kerberos] && \ + apt install krb5-user -y && \ + pip3 install pywinrm && \ + pip3 install ansible && \ + apt-get install -y iputils-ping && \ + apt install openssh-server sudo -y && \ useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 test + +RUN echo 'test:test' | chpasswd && \ +service ssh start + +EXPOSE 22 + +CMD ["/usr/sbin/sshd","-D"] diff --git a/ansible/README.md b/ansible/README.md new file mode 100644 index 0000000..13367a7 --- /dev/null +++ b/ansible/README.md @@ -0,0 +1,15 @@ +ansible +========== +This Dockerfile is for building an ansible environment. + +![](https://github.com/rezabojnordi) + +## Make Images + +``` +$ docker login + +$ docker build -t ansible:latest . +``` + +[1]: https://github.com/rezabojnordi