2
votes

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?

1
Try install it this way curl -SsL https://get.docker.com | sh and see if it worksTarun Lalwani
Thanks Tarun for your replay. curl -SsL get.docker.com | sh It didn't worked for meRts study
Which version of Redhat do you have?Tarun Lalwani
it was looking for the decency package container-selinux . do you have older version installed on our machine. run rpm -qa |grep container-selinux command see the outputsfgroups
see this thread and check you have centos version of docker installed. forums.docker.com/t/…sfgroups

1 Answers

1
votes

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