Docker config using ansible & exposing the container after pulling HTTPD image

đź”°Write an Ansible PlayBook that does the
following operations in the managed nodes

Shubham kumar
2 min readJan 14, 2021

🔹 Configure Docker
🔹 Start and enable Docker services
🔹 Pull the httpd server image from the Docker Hub
🔹 Run the docker container and expose it to the public
🔹 Copy the HTML code in /var/www/Html directory
and start the webserver

👉Configuring Docker and Starting and enabling the Docker services
→ for Configuring Docker, first, we have to setup Yum for Docker

→ After that install and start the services of Docker

👉Now pulling httpd image server from docker hub ( python should be installing for using pip)

👉 Run the docker container and expose it to the public

👉Copy the HTML code in /var/www/Html directory
and start the webserver

After copying the HTML file and exposing One can connect the webpage Through local networks

for full code refer to my GitHub link: click here

--

--

No responses yet