Docker Installation in Centos 7 and Ubuntu

Docker Installation in Centos 7 and Ubuntu 1

How to install docker in Centos 7 ?

To install the Docker in Centos, First we need to download the repository on the correct place ie.. “yum.repos.d” . Follow the below command to download Docker.

cd /etc/yum.repos.d/

yum install wget


Note:- If above is not working then first you need to install wget —

sudo yum install docker-ce docker-ce-cli



How to install the docker in ubuntu ?

First add the GPG key

curl -fsSL | sudo apt-key add -

Now, Add Docker repository

sudo add-apt-repository “deb [arch=amd64] $(lsb_release -cs) stable”

Now update the repository

sudo apt-get update

Installing the docker from the docker repository

apt-cache policy docker-ce

Now, We are ready to install the docker

sudo apt-get install -y docker-ce

Below commands are common for both Centos and Ubuntu

After installation check the status of the Docker

sudo systemctl status docker

Enable the docker on system reboot
sudo systemctl enable docker

Start the Docker
sudo systemctl start docker

To find the help for docker


How to find the images avaialable in dockerhub

docker search ubuntu

docker search nginx


I love helping beautiful people like you. I love hanging out with my dogs.

You may also like...

Leave a Reply

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

× How can I help you?