I am using this commands to install Docker CE on RHEL7 and I am failing with the following: This started tonight after working flawlessly for some time:

sudo yum install -y yum-utils

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

sudo yum install docker-ce docker-ce-cli containerd.io

Any idea what changed and what happened?

[pzagalsky@pzagalsky-au-rhel7-pzagalsky ~]$ sudo yum install docker-ce docker-ce-cli containerd.io
Failed to set locale, defaulting to C
https://download.docker.com/linux/centos/7Server/x86_64/nightly/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


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

 One of the configured repositories failed (Docker CE Nightly - x86_64),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=docker-ce-nightly ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable docker-ce-nightly
            subscription-manager repos --disable=docker-ce-nightly

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice

            yum-config-manager --save --setopt=docker-ce-nightly.skip_if_unavailable=true

failure: repodata/repomd.xml from docker-ce-nightly: [Errno 256] No more mirrors to try.
https://download.docker.com/linux/centos/7Server/x86_64/nightly/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

So we have just had this issue on install and uninstall (and it all worked fine yesterday).

Looking at the error code you see:

[Errno 14] HTTPS Error 404 - Not Found

And plugging this url into a browser indeed 404s... it looks to me like the '/7Server/' bit has an extra Server ...

Although we had temporary success modifying the /etc/yum.repos.d/docker-ce.repo it turns out that we were incorrectly using the Centos yum repo whereas we actually needed to use the specific repo for our OS - in our case OL7.

The poster of the question was also most likely using the wrong yum repo and needed to use the RHEL repo.

So the valid fix for this is to choose the correct yum repo for your Linux distribution and the docker installation via yum should work.

See https://docs.docker.com/engine/install/ for most distributions

If you are using a cloud hosted instance then you may have the default yum repo pre-configured on your Linux instance, this was the case with our OL7 instance and our ansible code had incorrectly added the centos yum repo in causing the issue.

Thanks jsbilling for info on this issue.

  • Yep, that seems to work. Is this a Red Hat issue that they'll solve you think? – Pavel Zagalsky Sep 24 '20 at 12:09
  • It isn't an RHEL issue, it's that the original poster used the wrong repo. The RHEL repo (download.docker.com/linux/rhel/docker-ce.repo) has the 7 hard-coded. The CentOS repo uses $releasever which works. – jsbillings Sep 24 '20 at 13:11
  • Very interesting.. so it could be that it was lucky it worked with the wrong Centos repo then started to fail when something in that version changed. Shame they don't list the RHEL repo on docs.docker.com/engine/install ... a lot of people pick Centos when RHEL isn't obviously available. – j3r3m7 Sep 24 '20 at 13:24
  • I agree. It's unfortunate, but RHEL has always had 7Server (or 7Workstation or 7Client) for $releasever so probably when Docker released packages for CentOS 8, they changed the default repo to have $releasever instead of a hard-coded 7. – jsbillings Sep 24 '20 at 13:27
  • @jsbillings It's been a common scenario to use the centOS repo with use of $releasever. This was because Docker wanted to get EE $$ from RHEL users because they figured they would pay since they're already paying for RHEL. While you might think we can use the RHEL repo, you can see that x86_64 builds are not available. download.docker.com/linux/rhel/7 – C Fairweather Sep 24 '20 at 15:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.