<< PREVIOUS      NEXT >>




  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. yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm


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


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




    8. yum install docker-ce



    9. systemctl enable --now docker.service


    10. 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. chmod +x /usr/local/bin/docker-compose



    12. 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




<< PREVIOUS      NEXT >>