How to Install Docker Engine - Community (EC) on CentOS 7,8

How to Install Docker Engine - Community (EC) on CentOS 7,8 with Latest Version

Uninstall old versions 
Step1 :- sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
or
sudo yum remove docker-ce
sudo rm -rf /var/lib/docker

Install docker ce
Step2 :- sudo dnf install docker-ce-3:18.09.1-3.el7

DNS resolution
Step3 :- sudo systemctl disable firewalld

Start and enable docker daemon
Step4 :- sudo systemctl enable --now docker
or 
sudo systemctl start docker

Verify that Docker EC is installed
Step5 :- sudo docker run hello-world

Adding user to docker group
Step5 :-  sudo usermod -aG docker $USER

Log out and again log in back

Now install the containerd.io package
If you cannot use Docker’s repository to install Docker, you can download the .rpm file for your release and install it manually. You need to download a new file each time you want to upgrade Docker Engine - Community.

Install latest version of docker ce
Step7 :- sudo dnf install docker-ce

0 Comments