1. Log in to the two newly created machines using SSH and install Docker and Docker Compose using the commands below:

    1. sudo su



    2. Register the machine with the Red Hat subscription to download dependencies

      1. subscription-manager register --username <username> --password <password> --auto-attach


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


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


    5. yum install -y yum-utils device-mapper-persistent-data lvm2


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




    7. yum install docker-ce



    8. systemctl enable --now docker.service


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


    10. chmod +x /usr/local/bin/docker-compose



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



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

    1. docker version



    2. docker-compose version