Docker Community Forums

Share and learn in the Docker community.

Docker Installation failing due to change in repo structure

Hi , I have been using “curl -fsSL” in my script for installation of docker. But recently we noticed that the installation has been failing with below error.

Errors during downloading metadata for repository ‘docker-ce-stable’:
Status code: 404 for (IP:
Error: Failed to download metadata for repo ‘docker-ce-stable’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

The repo structure had a folder named x86_64 before which is not there any more. With the change in repo structure docker script does not work any more.

Kindly update the script to be compatible with new directory structure so that we can install docker properly as we had done previously.

Install using the repository
Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.

Install the yum-utils package (which provides the yum-config-manager utility) and set up the stable repository.

$ sudo yum install -y yum-utils

$ sudo yum-config-manager
Optional: Enable the nightly or test repositories.

These repositories are included in the docker.repo file above but are disabled by default. You can enable them alongside the stable repository. The following command enables the nightly repository.

$ sudo yum-config-manager --enable docker-ce-nightly
To enable the test channel, run the following command:

$ sudo yum-config-manager --enable docker-ce-test
You can disable the nightly or test repository by running the yum-config-manager command with the --disable flag. To re-enable it, use the --enable flag. The following command disables the nightly repository.

$ sudo yum-config-manager --disable docker-ce-nightly