1. Log in to the two newly created machines using SSH 

  2. Install Docker and Docker Compose using the commands below:

    1. sudo su


    2. subscription-manager repos --enable=rhel-7-server-rpms 


    3. subscription-manager repos --enable=rhel-7-server-extras-rpms


    4. subscription-manager repos --enable=rhel-7-server-optional-rpms


    5. sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm


    6. sudo yum install -y yum-utils device-mapper-persistent-data lvm2


    7. sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo


    8. sudo yum install docker-ce


    9. sudo systemctl enable --now docker.service


    10. sudo curl -L "https://github.com/docker/compose/releases/
      download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose


    11. sudo chmod +x /usr/local/bin/docker-compose



    12. mv /usr/local/bin/docker-compose /usr/bin/



  3. Verification: Execute the commands below to verify the Docker and Docker Compose versions:

    1. docker version



    2. docker-compose version