beginner Part 2 of 4 — Docker for Beginners

Installing Docker on Ubuntu 22.04

By SkillMenzo Admin · 27 Jul 2026 · 1 min read

In this part, we'll install Docker Engine on an Ubuntu 22.04 server and confirm everything works.

Step 1 — Update Your Package Index

sudo apt update
sudo apt upgrade -y

Step 2 — Install Required Dependencies

sudo apt install -y ca-certificates curl gnupg

Step 3 — Add Docker's Official GPG Key and Repository

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Step 4 — Install Docker Engine

sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

Step 5 — Verify the Installation

sudo docker run hello-world

If you see a "Hello from Docker!" message, your installation is working correctly.

Optional — Run Docker Without sudo

sudo usermod -aG docker $USER

Log out and back in for this to take effect. Next up: working with Docker images.