Set up the repository

You only need to set up the repository once, after which you can install MCR from the repository and upgrade as needed. MCR supports the latest version of CentOS 64-bit running on x86_64.

Note

MCR supports the overlay2 storage drivers on CentOS. The following limitations apply:

  • If you enable selinux, MCR supports overlay2 on CentoOS 7.4 and higher.

  • If you disable selinux, MCR supports overlay2 on CentOS 7.2 and higher, with kernel version 3.10.0-693 and higher.

  1. Remove any existing Docker repositories from /etc/yum.repos.d/:

    sudo rm /etc/yum.repos.d/docker*.repo
    
  2. Store http://repos.mirantis.com in an environment variable:

    export DOCKERURL="http://repos.mirantis.com"
    
  3. Store the value of DOCKERURL using a yum variable in /etc/yum/vars/:

    sudo -E sh -c \
    'echo "$DOCKERURL/centos" > /etc/yum/vars/dockerurl'
    
  4. Store your operating system version string in /etc/yum/vars/dockerosversion:

    sudo sh -c 'echo "<version>" > /etc/yum/vars/dockerosversion'
    
  5. Install the yum-utils that provides the yum-config-manager utility:

    sudo yum install -y yum-utils
    
  6. Enable the extras RHEL repository to ensure access to the container-selinux package that docker-ee requires:

    sudo yum-config-manager --enable rhel-7-server-extras-rpms
            
    sudo yum-config-manager --enable extras
    sudo subscription-manager repos \
    --enable=rhel-7-for-power-le-extras-rpms
    sudo yum makecache fast
    sudo yum -y install container-selinux
            
  7. AWS and Azure require that you enable another repository:

    sudo sudo yum install -y rh-amazon-rhui-client
    sudo sudo yum-config-manager \
    --enable rhui-REGION-rhel-server-extras
            

    REGION is a literal. It does not represent the region your machine is running in.

    sudo yum-config-manager --enable rhui-rhel-7-server-rhui-extras-rpms
            
  8. Add the stable MCR repository:

    sudo -E yum-config-manager \
    --add-repo "$DOCKERURL/centos/docker-ee.repo"