With Docker we can develop and run applications in an isolated environment – containers. It is a cross-platform application. It was first released on March 20, 2013. And, at the time of writing v20.10.12 is its latest stable release. In this article, we would discuss how to install Docker in Ubuntu 22.04 release.
Note: Following operations would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator.
We would install Docker through standard Ubuntu repository.
Install Docker in Ubuntu 22.04
First, we need to update the standard Ubuntu repository. This makes sure we have the latest version of package available through the repository. Hence, open a terminal and issue the following –
sudo apt update
Next, to install Docker –
sudo apt install docker.io
To check if the Docker is successfully installed –
It should return with the Docker version installed. For us, it was –
Docker version 20.10.12, build 20.10.12-0ubuntu2
In conclusion, we have discussed how to install Docker in Ubuntu 22.04
Additional Info –
In this section, we try to pull docker image “hello-world” from the Docker Hub.
sudo docker run hello-world
It will first try to find the image locally, and if it couldn’t locate then it will pull the image for us from Docker Hub. But, next time if we run the same command it won’t pull from the Docker Hub as the image is already there locally.
If everything is perfect, then we would get the message that our installation appears to be working fine.