I tried to install Docker on Fedora 35 with the following commands:
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
But, I got the 404 error for the repository:
errors during downloading metadata for repository ‘docker-ce-stable’:
Status code: 404 for https://download.docker.com/linux/fedora/35/x86_64/stable/repodata/repomd.xml (IP: 13.227.108.44) Error: Falha ao baixar os metadados do repo. ‘docker-ce-stable’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Does anyone know how to solve this?
CodePudding user response:
did you tried these ?
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
CodePudding user response:
Someone on the official Fedora Forum managed to resolve it. So I'll put his answer here (https://ask.fedoraproject.org/t/error-on-install-docker-in-fedora-35/17165):
That’s because docker have not yet made a repository for Fedora 35. So for the time being, you’ll have to use their F34 packages. You’ll need to tweak your /etc/yum.repos.d/docker-ce.repo file to replace $releasever (which on Fedora 35 is 35) with 34.
So, it’ll look like this:
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/34/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
...
I check from time to time to see if docker have made a repo from F35 yet. When that happens, we’ll need to undo this change.