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


    4. subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --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/



  2. Verify the docker and docker compose versions using the commands:

    1. docker version #verify docker version


    2. docker-compose version #verify docker compose version