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 get.docker.com” 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 https://download.docker.com/linux/rhel/7/x86_64/stable/repodata/repomd.xml (IP: 13.225.222.25)
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.

SET UP 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
–add-repo
https://download.docker.com/linux/centos/docker-ce.repo
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