Configuring Docker and WebServer in Docker container using Ansible!

The task to be performed →

  1. First, configure the docker yum repository.
  2. Install Docker repository.
  3. Start the docker service.
  4. Pull the docker HTTPD image from DockerHub.
  5. Copy your file to the specified location of the HTTPD image to configure the webserver.

Procedure →

  • service:
    name: “docker”
    state: started
  • copy:
    src: /root/index1.html
    dest: /root/index1.html
my output

--

--

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