Docker Install on Ubuntu | 4 Easy Steps are Required

Docker install on ubuntu: This is very easy to install. Only when you follow all steps of this article. Then you can easily install docker on ubuntu.

Docker Install on Ubuntu

If you want docker install on ubuntu, for the very first time. Then this place is for you. Because we write article for absolute beginner and intermediate level.

But if you are also new to docker. And also want to know more information in very few time. Then you can read my article, which i have written “What is docker and how it works“. This is written in very simple language. So that even 10 year old child can understand this.

Docker install on ubuntu

Prerequisites of docker installation

  • Computer: RAM= 2GB, HDD= 80GB
  • Operating system: Ubuntu
  • Internet Connection

Step 1: Update Machine For Docker Install

Firstly, you should update or upgrade your machine. So for that, type the below command on you Ubuntu CLI.

sudo apt update 
sudo apt upgrade

Step 2: Docker install Necessary Packages On Ubuntu

After updating or upgrading your machine.
Then install some prerequisites packages. Before installing docker on Ubuntu.

sudo apt-get install curl apt-transport-https ca-certificates software-properties-common

Step 3: Add Repository In Ubuntu For Docker install

Now you will be adding the docker repository. After adding repository, then docker can be install very easily.

Add GPG Key

curl -fsSL | sudo apt-key add - 

After that, below command will add the repository

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

Now when you are ready to install docker. But before that you should update your machine again.

sudo apt update

Step 4: Docker Install on Ubuntu Command

Now you are all set for installation. Type below command to install

sudo apt install docker-ce docker-ce-cli

But if you required to install a specific version of docker. Then execute below command

sudo apt install docker-ce=<VERSION> docker-ce-cli=<VERSION>

When you execute this command, for sometime you will have to wait. Till your installation process completes. Once it is completed. Then go for next step.

Step 5: Check Docker Install Status

When your installation completes. Then check the status of your docker.

This command will show you that Docker is active or inactive.

sudo systemctl status docker

Then the output should look like this

‚óŹ docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-05-21 14:47:34 UTC; 42s ago ...

Step 6: Run Command After Docker Installation

Once all this is done. Then you have to check that docker is working fine or not. To do so execute below command.

sudo docker container run hello-world

When you run this command. Then it should look like this.

Docker Install on Ubuntu process

When-ever you want to run docker command without using sudo. Then execute the following command.

sudo usermod -aG docker $USER

What is Docker For

When you are going to work on Docker. Before starting directly on Docker. First you should be aware about the basic concept. Only then you should move forward.

So if you want to learn Docker. Then read the below complete article.

What is Docker for

Docker Commands

When you have completed the installation of docker on Ubuntu machine. Then you should learn the docker command. But for working on docker, you should know basic docker commands.

Basic Docker command cheat sheet
Way Docker install ubuntu


In conclusion, we have covered the thing. How to docker install on Ubuntu. While following those steps, you won’t face any error. So it will be hassle free docker installation for you.

Therefore, I hope this article was very helpful for you to docker install on Ubuntu.

Thank you so much, because your time matter to us.