I am trying to install Docker CE
on RHEL
using this link. This is my RHEL version:
Red Hat Enterprise Linux Server release 7.3 (Mai
I followed many links including the official documentation, however it all ended up in this error:
Requires: container-selinux >= 2.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
The only way it worked for me is as follows (yum upgrade
worked I guess):
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum upgrade docker-ce
You have already have container-selinux installed for version 3.7 check if the following docker-ce version works for you , it did for me.
sudo yum -y install docker-ce-cli.x86_64 1:19.03.5-3.el7
I was getting the same error Requires: container-selinux >= 2.9 on amazon ec2 instance(Rhel7)
I tried to add extra package rmp repo by executing
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
but it works.
followed steps from https://installdocker.blogspot.com/ and I was able to install docker.
Installing the Selinux from the Centos repository worked for me:
1. Go to http://mirror.centos.org/centos/7/extras/x86_64/Packages/
2. Find the latest version for container-selinux i.e. container-selinux-2.21-1.el7.noarch.rpm
3. Run the following command on your terminal: $ sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/**Add_current_container-selinux_package_here**
4. The command should looks like the following $ sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.21-1.el7.noarch.rpm
Note: the container version is constantly being updated, that is why you should look for the latest version in the Centos' repository
Head to http://mirror.centos.org/centos/7/extras/x86_64/Packages/ and get the link to the latest container-selinux package. In my case the link was http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.68-1.el7.noarch.rpm
Head to your terminal as root and run:
yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.68-1.el7.noarch.rpm
After that you can proceed to install docker:
yum install docker-ce
Docker CE is not supported on RHEL. Any way you are trying to get around that is not a supported way. You can see the supported platforms in the Docker Documentation. I suggest you either use a supported OS, or switch to Enterprise Edition.