Prepare RHEL 7.4 for DC/OS installation

Requirements and recommendations for installing Docker on RHEL

Requirements and Recommendations

Before installing Docker on RHEL, review the general requirements and recommendations for running Docker on DC/OS and utilize the instructions below:

  • Use these directions to install the DC/OS bootstrap node on RHEL 7.4

  • These directions cover the installation of Docker CE 17.05+ on RHEL

  • OverlayFS is now the default in Docker CE. There is no longer a need to specify or configure the overlay driver.

  • These instructions are specific to RHEL 7.4. Other versions of RHEL 7 should work but might require minor modifications to the commands.

Installation Procedure

The following instructions demonstrate how to prepare a RHEL 7.4 system for DC/OS. All of the commands should be run as root or by prefixing each command with ‘sudo’

  1. Disable the firewall

    systemctl stop firewalld && systemctl disable firewalld
    
  2. Subscribe the RHEL system in subscription-manager and add the repos

    subscription-manager register --username <RHEL-SUBSCRIPTION-USERNAME> --password ******** --auto-attach
    
    subscription-manager repos --enable=rhel-7-server-rpms
    subscription-manager repos --enable=rhel-7-server-extras-rpms
    subscription-manager repos --enable=rhel-7-server-optional-rpms
    
  3. Configure OS for overlay storage

    echo 'overlay' >> /etc/modules-load.d/overlay.conf
    modprobe overlay
    
  4. Run yum update

    yum update --exclude=docker-engine,docker-engine-selinux,centos-release* --assumeyes --tolerant
    
  5. Install other necessary tools:

    yum install -y wget curl zip unzip ipset ntp screen bind-utils
    
  6. Install jq for better parsing of .json files

    wget http://stedolan.github.io/jq/download/linux64/jq
    
    chmod +x ./jq
    
    cp jq /usr/bin
    
  7. Add a group called nogroup

    groupadd nogroup
    
  8. Enable non-TTY sudo

    sed -i -e 's/Defaults    requiretty/#Defaults    requiretty/g' /etc/sudoers
    
  9. Disable IPv6 (optional)

    sysctl -w net.ipv6.conf.all.disable_ipv6=1
    sysctl -w net.ipv6.conf.default.disable_ipv6=1
    
  10. Disable SElinux

    sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config
    set enforce 0
    
  11. Disable DNSmasq (DC/OS requires access to port 53)

    systemctl stop dnsmasq
    systemctl disable dnsmasq.service
    
  12. Un-install old versions of Docker (if present)

    sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
    
  13. Set up Docker CE repo

    yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
    
  14. Show versions of Docker CE. The remainder of these instructions assume that you have installed the latest version.

    yum list docker-ce --showduplicates | sort -r
    
  15. Install Docker CE

    yum install docker-ce
    
  16. Start Docker

    systemctl start docker
    
  17. Test Docker with hello-world app

    docker run hello-world
    
  18. Verify that Docker is using the overlay driver

    docker info | grep Storage
    

To continue setting up DC/OS, please jump to the Advanced Installer

For more generic Docker requirements, see System Requirements: Docker.