CONFIGURING WEBSERVER INSIDE DOCKER CONTAINER BY USING ANSIBLE!!

  • Dockerize SSH — Install SSH and Enable SSH Service in Docker
  • Configure Webserver in Docker with Ansible
  • Ansible Installed and configured :
  • Docker Installed
# docker run -it  -p  8080:80  --name  <Container_Name>  <docker_image_name>:<version>
  • As we know systemctl command doesn’t work inside the Docker Container, so that we need to find which file will start this services.
  • For SSH we have to run /usr/sbin/sshd with these options: do not detach (-D), log to stderr (-e), passthrough other arguments.

Now the main task come here is , fetch the docker container IP dynamically and update the inventory without going inside it , also run a playbook for docker container , which will configure the webserver inside the container .

Thank You so much for Reading😊!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store