Build images:
docker build -t mynode .
docker build -f Dockerfile-centos -t mynode .
Run the container:
docker run -d --name my_node -p 22:22 mynode
Find out IP:
docker inspect --format "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" my_node
Update hosts file:
[ec2instances]
my_node ansible_ssh_host=172.17.0.2 ansible_ssh_port=22 ansible_ssh_user=root ansible_ssh_pass=root@123
Run automation script:
sudo ansible-playbook -i hosts ec2discovery.yml -v
Check results in aurea-docker-automation-linux/results/my_node_20170808_175854.18693/dockerized/dockerfiles/__ALL_TOOLS__/Dockerfile
file.
That's it!