How to Install Docker on Ubuntu 22.04 (Step-by-Step Guide)

In this quick tutorial, I’ll show you how to install Docker on Ubuntu 22.04. Docker is a powerful platform used to create, deploy, and manage lightweight containers.

Step 1: Update the System

First, update your package list:

sudo apt update

Step 2: Install Required Packages

Install some necessary tools and certificates:

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

Step 3: Add Docker’s Official GPG Key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Step 4: Add Docker Repository

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Step 5: Update Again

Update the package list to include Docker’s packages:

sudo apt update

Step 6: Install Docker

Now install Docker Community Edition:

sudo apt install docker-ce

Step 7: Check Docker Status

Make sure Docker is running:

sudo systemctl status docker

You should see something like “active (running)”.


(Optional) Step 8: Run Docker Without Sudo

To run Docker as a normal user (without using sudo every time):

sudo usermod -aG docker $USER

After this, log out and log back in to apply the group changes.


That’s It! Docker is now installed on your Ubuntu 22.04 server! You can now start using containers to run your applications more efficiently.

Leave a Reply

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