Requirements and Recommendations
These directions cover the installation of Docker CE on CentOS/RHEL. Before installing Docker on CentOS/RHEL, review the general requirements and recommendations for running Docker on DC/OS.
OverlayFS is now the default in Docker CE. There is no longer a need to specify or configure the overlay driver. OverlayFS avoids known issues with
loop-lvmmode and allows containers to use docker-in-docker, if they want.
These instructions are specific to CentOS/RHEL 7.4. Other versions of CentOS/RHEL 7 should work but might require minor modifications to the commands.
You must format node storage as XFS with the
ftype=1option. As of CentOS/RHEL 7.2, only XFS is currently supported for use as a lower layer file system. See the RHEL release notes.
For more generic Docker requirements, see System Requirements: Docker.
Note: In modern versions of Centos and RHEL,
ftype=1 is the default. The
xfs_info utility can be used to verify that
mkfs -t xfs -n ftype=1 /dev/sdc1
Follow the Docker CentOS-specific installation instructions.
You must register with the subcription-manager to enable additional repos.
Subscribe the RHEL system in subscription-manager and add the repos
sudo subscription-manager register --username <RHEL-SUBSCRIPTION-USERNAME> --password ******** --auto-attach sudo subscription-manager repos --enable=rhel-7-server-rpms sudo subscription-manager repos --enable=rhel-7-server-extras-rpms sudo subscription-manager repos --enable=rhel-7-server-optional-rpms
Example: Installing Docker with OverlayFS on CentOS/RedHat
The following instructions demonstrate how to use Docker with OverlayFS on CentOS 7.
Configure OS for overlay storage:
echo 'overlay' | sudo tee -a /etc/modules-load.d/overlay.conf sudo modprobe overlay
sudo yum update --exclude=docker-engine,docker-engine-selinux,centos-release* --assumeyes --tolerant
Un-install old versions of Docker (if present):
sudo yum remove docker \ docker-common \ docker-selinux \ docker-engine
Set up Docker CE repository:
sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
Show versions of Docker CE.
sudo yum list docker-ce --showduplicates | sort -r
The remainder of these instructions assume that you have installed the latest version.
Install Docker CE:
sudo yum install docker-ce
sudo systemctl start docker sudo systemctl enable docker
Test Docker with
sudo docker run hello-world
Verify that Docker is using the overlay driver:
sudo docker info | grep Storage
To continue setting up DC/OS, see the Installation documentation.