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.
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.
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
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
Now you will be adding the docker repository. After adding repository, then docker can be install very easily.
Add GPG Key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
After that, below command will add the repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Now when you are ready to install docker. But before that you should update your machine again.
sudo apt update
Now you are all set for installation. Type below command to install
sudo apt install docker-ce docker-ce-cli containerd.io
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> containerd.io
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.
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 ...
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.
When-ever you want to run docker command without using sudo. Then execute the following command.
sudo usermod -aG docker $USER
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.
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.
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.