How to install the docker on Ubuntu

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 | sudo apt-key add -

Add the repository

sudo add-apt-repository "deb [arch=amd64] 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

Leave a Reply

Your email address will not be published. Required fields are marked *