Updating to Docker CE

Use this procedure to update Docker to Docker Community Edition (Docker CE) version 17.03.1.
  1. Log in as root, or as a user with superuser privileges.
  2. Remove the Docker repository description file.
    Docker CE uses a different file.
    rm -f /etc/yum.repos.d/docker.repo
  3. Update the Linux kernel, if necessary.
    1. Determine which kernel version is installed.
      uname -r
      If the result is 3.10.0-327.36.2 or lower, perform the following substeps.
    2. Update the kernel, and then restart the host.
      The following commands require internet access or a local mirror of operating system packages.
      yum makecache fast && yum update -y kernel && reboot
  4. Install the Docker CE repository description file.
    cat <<EOF > /etc/yum.repos.d/docker-ce.repo
    name=Docker CE Stable - \$basearch
  5. Identify the name of the LVM thin pool for Docker.
    1. Start the Docker service.
      systemctl start docker
    2. Display the name of the LVM thin pool for Docker.
      docker info 2>/dev/null | grep 'Pool Name'
      Example result:
       Pool Name: docker-docker--pool

      Record the name for use in a subsequent step.

    3. Stop the Docker service.
      systemctl stop docker
  6. Back up the Docker environment file.
    test -f /etc/sysconfig/docker \
      && mv /etc/sysconfig/docker /etc/sysconfig/docker.bak
  7. Remove Docker 1.9.0 without checking dependencies.
    rpm -e --nodeps docker-engine-1.9.0
  8. Install Docker CE 17.03.1.
    yum install -y --disablerepo=\* --enablerepo=zenoss-mirror \
  9. Disable unintended Docker updates.
    1. Open /etc/yum.repos.d/docker-ce.repo with a text editor.
    2. Change the value of the enabled key from 1 to 0.
    3. Save the file, and then close the text editor.