Skip to main content


Install Docker on a Linux system using the yum package manager

Learning from collaboration

To install Docker on a Linux system using the yum package manager

In Linux we have various packages manager for our use case use yum or dnf package manager (since amazon ec2 Linux recommend using the yum package manager for easy installation)

we can follow these steps to install docker on Linux. 

Update the package manager by running the following command:

step 1: sudo yum update

step 2: sudo yum-config-manager –add-repo

After running the above command, we will get the below Error:


[root@ip-172-31-45-*** home]# sudo yum-config-manager –add-repo

sudo: yum-config-manager: command not found.

To resolve this issue, we have to use this method:

1.sudo yum install yum-utils

again try to run the same command

2.sudo yum-config-manager –add-repo

step 3: sudo yum install docker-ce

while install the docker-ce we will get this below error


[root@ip-172-31-45-*** home]# sudo yum install docker-ce

Docker CE Stable – x86_64                                                                                                         575  B/s | 397  B     00:00

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

Ignoring repositories: docker-ce-stable

Last metadata expiration check: 1 day, 20:04:19 ago on Mon May 29 17:08:22 2023.

No match for argument: docker-ce

Error: Unable to find a match: docker-ce


To resolve this issue we have follow this approach :

step 1: sudo rm /etc/yum.repos.d/docker-ce.repo

step 2 : sudo vi /etc/yum.repos.d/docker-ce.repo

Paste the below statement inside the page


name=Docker CE Stable – $basearch







step 1: sudo yum update

step 2: sudo yum install docker-ce

step 3: sudo systemctl start docker

step4 :sudo systemctl enable docker.

step5: sudo systemctl status docker



Finally, we can see the docket was installed successfully!! Happy learning!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Jeevanantham Balakrishnan

Jeevanantham Balakrishnan works at Perficient as Technical Consultant. He has a firm understanding of technologies like Databricks, Spark, AWS, and DevOps. He is keen to learn new technologies.

More from this Author

Follow Us