In today’s article, we won’t talk about much. This is a simple docker installation article. You just need to throw these commands in your Linux terminal and you are good to go. Your docker will be installed. Let’s see how we can start with the installation.
Update the system with the below commands
sudo apt update && sudo apt upgrade
Install the necessary packages
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Curl the key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
This will update the package database with the docker packages
apt-cache policy docker-ce
Install the docker ce
sudo apt install docker-ce
Check the docker status
sudo systemctl status docker
Executing the Docker Command Without Sudo (optional)
sudo usermod -aG docker ${USER}
Run the test container
docker run hello-world