0

I searched for many links, they are showing only for centos even though the title is for RHEL also.

My OS details:

cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.4 (Maipo)

uname -r

3.10.0-693.58.1.el7.x86_64

I ran this to add repo

sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo

THen this

sudo yum install docker-ce

But giving this error.

Loaded plugins: langpacks, product-id, search-disabled-repos https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

rhel-7-server-rpms
| 3.4 kB 00:00:00 rhui-microsoft-azure-rhel7-eus
| 2.1 kB 00:00:00 rhui-rhel-7-server-dotnet-rhui-rpms
| 2.3 kB 00:00:00 rhui-rhel-7-server-rhui-eus-optional-rpms
| 1.8 kB 00:00:00 rhui-rhel-7-server-rhui-eus-rpms
| 2.0 kB 00:00:00 rhui-rhel-7-server-rhui-eus-supplementary-rpms
| 2.0 kB 00:00:00 rhui-rhel-7-server-rhui-rh-common-rpms
| 2.1 kB 00:00:00 rhui-rhel-server-rhui-rhscl-7-rpms
| 2.0 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package docker-ce.x86_64 3:19.03.12-3.el7 will be installed --> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-19.03.12-3.el7.x86_64 --> Processing Dependency: containerd.io >= 1.2.2-3 for package: 3:docker-ce-19.03.12-3.el7.x86_64 --> Processing Dependency: docker-ce-cli for package: 3:docker-ce-19.03.12-3.el7.x86_64 --> Running transaction check ---> Package containerd.io.x86_64 0:1.2.13-3.2.el7 will be installed --> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.2.el7.x86_64 ---> Package docker-ce.x86_64 3:19.03.12-3.el7 will be installed --> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-19.03.12-3.el7.x86_64 ---> Package docker-ce-cli.x86_64 1:19.03.12-3.el7 will be installed --> Finished Dependency Resolution Error: Package: containerd.io-1.2.13-3.2.el7.x86_64 (docker-ce-stable) Requires: container-selinux >= 2:2.74 Error: Package: 3:docker-ce-19.03.12-3.el7.x86_64 (docker-ce-stable) Requires: container-selinux >= 2:2.74 ********************************************************************** 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: containerd.io-1.2.13-3.2.el7.x86_64 (docker-ce-stable) Requires: container-selinux >= 2:2.74 Error: Package: 3:docker-ce-19.03.12-3.el7.x86_64 (docker-ce-stable) Requires: container-selinux >= 2:2.74 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

Please suggest.

5 Answers 5

2

Docker CE currently requires RHEL/CentOS 7.6 or higher. You will need to upgrade the OS from 7.4 before continuing.

2
  • I tried on RHEL 8 now, still same issue Jun 25, 2020 at 17:25
  • 1
    @UdayKiranReddy If you were on RHEL 8, it would either succeed, or have a different issue. Jun 26, 2020 at 22:35
0

You can use the centos repositories instead of Redhat. Just disable the repository you just added with yum-config-manager --disable repository and run,

# yum  -y remove  docker-common docker container-selinux docker-selinux docker-engine
# yum -y install lvm2 device-mapper device-mapper-persistent-data device-mapper-event device-mapper-libs device-mapper-event-libs
# yum -y install  wget
# wget https://download.docker.com/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo

Enable the rhel-7-server-extras-rpms repository,

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

and finally,

yum -y install docker-ce
11
0

Make sure you remove old packages.

yum  -y remove  docker-common docker container-selinux docker-selinux docker-engine
1
  • yes Kishore, I did but still same issue Jun 25, 2020 at 17:34
0

Install container-selinux from centos mirrors and try installing docker-ce again.

Reference: http://ksssblogs.blogspot.com/2020/07/installing-docker-on-rhel-centos.html

0

to fix that follow below steps in addition to

wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
sudo rpm -i container-selinux-2.107.el7.noarch.rpm
 
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/slirp4netns-0.4.3-4.el7_8.x86_64.rpm
 
#Set up the Docker CE repository on RHEL:
sudo yum install -y yum-utils
sudo yum install -y device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
yum install docker-ce docker-ce-cli containerd.io
#Start Docker:
sudo systemctl start docker
 
#Test your Docker CE installation:
sudo docker run hello-world

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .