Closed ineffyble closed 3 years ago
haha! what a joke.
long live containerd?!
Wow! Since this is apparently not going to get fixed, it desperately needs to get added to the docs. (I lost a lot of time on this.)
If the docs had just said:
There is an open issue that we are still thinking about. Until we decide to fix the redirect to work on the actual file you need, add this call before you run
yum install
:
sudo yum-config-manager --setopt="docker-ce-stable.baseurl=https://download.docker.com/linux/centos/7/x86_64/stable" --save
(Tongue and cheek added since this is kind of depressing to have a redirect cause so much sadness.)
@Vaccano
You have a space between download
and .docker.com
in value of docker-ce-stable.baseurl
.
Fast forward to Mar '21, this problem still exists. I am trying to install docker
on an Amazon Linux 2 EC2 instance - which, I believe, is RHEL 7. And, this is what I see after doing the yum-config-manager
.
sudo yum install docker-ce docker-ce-cli containerd.io -y
Failed to set locale, defaulting to C
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00:00
amzn2extra-docker | 3.0 kB 00:00:00
No package docker-ce available.
No package docker-ce-cli available.
No package containerd.io available.
Error: Nothing to do
I got this error and come here, after fixing the broken repo, I got some other dependencies error afterward. Anyway, I installed it finally. If you failed to install docker on Oracle Linux 7.9 or CentOS 7.x ( coz they are alike), check this link:
I wrote a script here, you can use the bash script to install it.
Still a problem. wtf @docker
@chaseduffin I think fixes were made for this; are you still running into this issue? What $releaseVer
does your machine have?
I just tried to reproduce the problem (quick check in a container);
docker run -it --rm centos:7
Add the repository;
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Set 7Server
as $releasever
to mimic the scenario reported here:
for channel in "stable" "test" "nightly"; do \
relver=7Server; \
yum-config-manager --setopt="docker-ce-${channel}.baseurl=https://download.docker.com/linux/centos/$relver/\$basearch/${channel}" --save; \
yum-config-manager --setopt="docker-ce-${channel}-debuginfo.baseurl=https://download.docker.com/linux/centos/$relver/debug-\$basearch/${channel}" --save; \
yum-config-manager --setopt="docker-ce-${channel}-source.baseurl=https://download.docker.com/linux/centos/$relver/source/${channel}" --save; \
done
Verify that that worked correct, and that the repository now has 7Server
in its repo-URL:
yum repolist -v docker-ce-stable
...
Repo-id : docker-ce-stable/x86_64
Repo-name : Docker CE Stable - x86_64
Repo-status : enabled
Repo-revision: 1618226779
Repo-updated : Mon Apr 12 11:26:19 2021
Repo-pkgs : 112
Repo-size : 2.7 G
Repo-baseurl : https://download.docker.com/linux/centos/7Server/x86_64/stable/
Repo-expire : 21600 second(s) (last: Thu Apr 15 12:14:22 2021)
Filter : read-only:present
Repo-filename: /etc/yum.repos.d/docker-ce.repo
Install docker-ce:
yum install -y --quiet docker-ce
warning: /var/cache/yum/x86_64/7/base/packages/audit-libs-python-2.8.5-4.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for audit-libs-python-2.8.5-4.el7.x86_64.rpm is not installed
Public key for container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm is not installed
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-20.10.6-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-20.10.6-3.el7.x86_64.rpm is not installed
Public key for selinux-policy-3.13.1-268.el7_9.2.noarch.rpm is not installed
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-9.2009.0.el7.centos.x86_64 (@CentOS)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0x621E9F35:
Userid : "Docker Release (CE rpm) <docker@docker.com>"
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From : https://download.docker.com/linux/centos/gpg
setsebool: SELinux is disabled.
Check that things were installed:
docker --version
Docker version 20.10.6, build 370c289
dockerd --version
Docker version 20.10.6, build 8728dd2
containerd --version
containerd containerd.io 1.4.4 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
@docker guys should feel ashamed that this bug has been open for 4 months. Who is in charge of this issue?
I got little solution about 404.
sudo rm -rf /var/cache/yum/x86_64/7/docker-ce*
yum update
yum install docker-ce
then work for me.
closing as this should be fixed https://github.com/docker/for-linux/issues/1111#issuecomment-820381106
Issue still exists on CentOS 8. (CentOS Linux release 8.4.2105)
sudo yum install docker-ce docker-ce-cli containerd.io repository for docker ce 500 B/s | 382 B 00:00 Errors during downloading metadata for repository 'docker-ce-stable':
Followed the instructions: https://docs.docker.com/engine/install/centos/
Given the switch to CentOS Stream, I suspect this may not ever be fixed, at least not soon.
@rindeastwood what does yum repolist -v docker-ce-stable
show for you? That URL it's trying to download looks really wrong (https://download.docker.com/linux/centos/docker-ce.repo
is a file)
Still broken for me.
OS details:
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
Amazon Linux release 2 (Karoo)
The solution mentioned here: https://forums.docker.com/t/docker-ce-stable-x86-64-repo-not-available-https-error-404-not-found-https-download-docker-com-linux-centos-7server-x86-64-stable-repodata-repomd-xml/98965/6
worked for me
@johntiger1 we currently don't have packages for Amazon Linux on download.docker.com, so that's somewhat expected (but good to hear the workaround worked)
NEVERMIND THE REPO FILE IS WORKING NOW.
@thaJeztah this repo file is empty, I assume it should not be. It's causing No package docker-ce-cli available.
.
[root@df8a58a4f7b9 /]# curl --head -H 'Cache-control: no-cache' https://download.docker.com/linux/centos/docker-ce.repo?foo
HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 0
Connection: keep-alive
Date: Mon, 18 Sep 2023 12:53:28 GMT
Last-Modified: Fri, 15 Sep 2023 23:26:10 GMT
ETag: "d41d8cd98f00b204e9800998ecf8427e"
Server: AmazonS3
X-Cache: Hit from cloudfront
Via: 1.1 aed14b36df96d4ec7e7cb3f8e4883524.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: DFW55-C3
X-Amz-Cf-Id: Et0mUV1kklpkvHhJxZKk3pNMadt_ncgf1JEQpyO6LnZFE_0c96l2Qw==
Age: 7570
Expected behavior
yum install
is able to install docker-ce from the repo provided athttp://download.docker.com/linux/centos/docker-ce.repo
when the$releasever
variable is set to7Server
.Actual behavior
At some point in the last week, this has stopped working, and https://download.docker.com/linux/centos/7Server is now a 404. I suspect this coincides with the release of the CentOS 8 packages.
https://download.docker.com/linux/centos/7 still exists, but that is not the same
$releasever
and so the repo reference inhttp://download.docker.com/linux/centos/docker-ce.repo
is broken.Steps to reproduce the behavior
Attempt to install Docker from the provided CentOS/RHEL repo with an installation of CentOS/RHEL that has
7Server
set as the yumreleasever
.