Installing Docker CE in redhat

7/31/2017

I have tried to install Docker CE in my system and it ends with some problem.

I did the below steps:

  1. sudo yum install -y yum-utils – No error
  2. sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - No error
  3. sudo yum makecache fast – No error
  4. sudo yum -y install docker-ce – Failed with error

Error: Package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 (docker-ce-stable) Requires: container-selinux >= 2.9


yum can be configured to try to resolve such errors by temporarily enabling disabled repos and searching for missing dependencies. To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf


Error: Package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 (docker-ce-stable) Requires: container-selinux >= 2.9 You could try using --skip-broken to work around the problem

Can someone please help me in this?

-- Rts study
docker
kubernetes

1 Answer

12/20/2017

The container-selinux package is available from the rhel-7-server-extras-rpms channel. You can enable it using:

subscription-manager repos --enable=rhel-7-server-extras-rpms

But if you do not have any subscription for Enterprise Linux, you can use CentOS Extra repo as a workaround. Add the below content into /etc/yum.repos.d/centos.repo

[CentOS-extras]
name=CentOS-7-Extras
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-- Hardeep Singh
Source: StackOverflow