Cannot open rpm file during the installation of Docker on Centos

I am trying to install docker but still I am unable to complete the installation due to multiple issues … this is the latest error —

[root@kube-master install-docker]# sudo yum install -y
Loaded plugins: fastestmirror, langpacks
Cannot open: Skipping.
Error: Nothing to do
[root@kube-master install-docker]

can someone help on this …

Is this a machine without internet access? Is this why you chose to install it from an rpm file? If it is, then you won’t be able to use the URL of the RPM file either.

Based on your prompt it looks like you are trying to install Docker on a Kubernetes master node. If you have Kubernetes, then you might have Docker too. Although new Kubernetes versions Doesn’t use Docker but use containerd. If there is already a containerd installed on the machine which is used by Kubernetes, it is possible that you can’t install another containerd using the package manager.

machine have internet access few min back only I installed other packages…you are correct I am trying to install docker for kubernetes and this is new machine …no docker or kubernetes installed yet …

initially I tried this command to install docker curl | sudo bash - but it failed due to this reason —

adding repo from: < url/docker-ce.repo>

grabbing file < url/docker-ce.repo>

Could not fetch/save url < url/docker-ce.repo>: [Errno 12] Timeout on < url/docker-ce.repo>: (28, ‘Connection timed out after 185002 milliseconds’)

then saw these steps for docker install ----

I> sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
ii> sudo yum install -y yum-utils
iii> sudo yum-config-manager \
     --add-repo \
iv> sudo yum-config-manager --setopt="docker-ce-stable.baseurl=url://" --save
v> sudo yum install -y url://
vi> sudo yum install -y url://
vii> sudo yum install -y docker-ce docker-ce-cli
viii> sudo systemctl enable docker
ix> sudo systemctl start docker
x> sudo docker run -it --name hello-world --rm hello-world

I am configuring those one by one …once docker installed then only I can run kubernetes installation …

I tried this url also : Install Docker Engine on CentOS

but it failed on this command —

sudo yum-config-manager \
    --add-repo \

it failed with below error —

Could not fetch/save url < url/docker-ce.repo>: [Errno 12] Timeout on < url/docker-ce.repo>: (28, ‘Connection timed out after 185002 milliseconds’)

It still looks like a network issue. Can you use curl or wget to download the files instead of passing them to yum as an agument?

I am getting 443

[root@kube-master install-docker]# wget -O - /container-selinux-2.107-3.el7.noarch.rpm
–2023-04-06 19:48:51-- /container-selinux-2.107-3.el7.noarch.rpm
Resolving url (… 2a06:f902:a:29::2,
Connecting to url (|2a06:f902:a:29::2|:443…

this is curl output —

[root@kube-master install-docker]# curl -v

  • About to connect() to port 80 (#0)
  • Trying 2a01:4f9:2a:150d::10…

That is just a port number not an error code.

It is possible that your network doesn’t support IPv6 even though your host machine does. Since the domain has IPv6 address the DNS server returns that instead of the IPv4 address. In this case you would be able to access other sites that doesn’t have IPv6 addresses. To fix this, you should disable IPv6 on your machine.

And please, always use code blocks in case of sharing codes, terminal outputs, commands or logs so your message will not be changed by the forum. I already fixed two of your posts, but you could use code blocks previously.

yes , it works …thanks a lot for your help …

looks like Docker latest version doesn’t support with kubernetes …I may need to down grade that version …

WARN[0002] [state] can't fetch legacy cluster state from Kubernetes: Unsupported Docker version found [23.0.3] on host [], supported versions are [1.13.x 17.03.x 17.06.x 17.09.x 18.06.x 18.09.x 19.03.x 20.10.x]

Using Kubernetes with Docker as a container runtime is not recommended unless you really need it for some reason. Long time ago Docker was the default or at least widely used, but recent Kubernetes versions use containerd directly without Docker.

If you are not familiar with the ctr or crictl commands that couéd be used to manage containers/pods on specific nodes, you can install nerdctl which has very similar interface to Docker.

“nerdctl” stands for “contaiNERD CTL” as it is on the description of the GitHub repo.

I didn’t want to start with this, since we are on a Docker forum and you asked about Docker, but if your goal is to run Kubernetes on a server, you should consider using the containerd instead of Docker and use Docker on your local machine for development…

I haven’t installed Rancher recently, but Rancher Desktop uses containerd by default so you might want to check if you are using an old guide to install Rancher. If you have more questions about Rancher, could be a better place for your questions.

thanks for your reply…

I checked with Rancher support team and they confirmed that Docker team is working on the latest version 23.0 compatibility issue with Kubernetes…

Kubernetes with docker is our requirement , so I am doing the POC …but unfortunately installed wrong version of docker …

now what is the best way to remove docker from the machine I installed ? I will install previous compatible version 20.10 for now … later I need to go through the containerd but before that I need to understand …

The best way is always what the documentation says. The installation guide I shared above also contains how you can uninstall the old versions (at the beginning) or uninstal the new versions (at the end)

I am getting this error while install docker …and I can’t disable IVP6 …what is the other option to install successfully … need urgent help

can someone help here urgently please

There is no magic method. If it is caused by the IPv6 then you need to disable IPv6 or at least set a hostname in the hosts file if you have write access to that. Depending on the Kubernetes version, you could also configure the pod the be created with a custom hosts file: Adding entries to Pod /etc/hosts with HostAliases | Kubernetes

OF course it would be better to know if the issue is IPv6 or not. Network issues are often hard to find remotely so if you have a network expert in your team you should ask them to identify the issue. I doubt that you will find many people here installing Docker inside a Kubernetes pod in a CentOS container.