How to install Docker in Ubuntu

This article explains the detailed steps to install Docker in Ubuntu.

Step1: Login to the server via ssh as root.

Step2: Install dependent packages.

#apt install apt-transport-https ca-certificates curl software-properties-common

Step3: Add the GPG key for Docker repository.

#curl -fsSL | sudo apt-key add -

Step4: Add Docker repository to sources list.

#add-apt-repository "deb [arch=amd64] bionic stable"

Step5: Update the packages list.

#apt update

Step6: Install Docker package.

#apt install docker-ce

Step7: Start Docker service.

#systemctl start docker

That's all…