DEV Community

Cover image for Simply Docker Series (Ubuntu-Install)
Shushank Gautam
Shushank Gautam

Posted on

Simply Docker Series (Ubuntu-Install)

๐Ÿง Linux Users โ€” Letโ€™s Set Up Docker (Ubuntu/Debian Style ๐Ÿš€)

Installing Docker on Linux works a little differently, but donโ€™t worry โ€” just follow these simple steps and youโ€™ll have a clean Docker setup in no time.
No jargon, no confusion. Just smooth sailing ๐Ÿšขโœจ

๐Ÿ”น Step 1: Update Your System & Install Essentials

Before installing Docker, refresh your package list and install a few tools that help your system download Docker safely:

sudo apt update
sudo apt install ca-certificates curl gnupg
Enter fullscreen mode Exit fullscreen mode

โœ” ca-certificates โ†’ secure downloads
โœ” curl โ†’ fetches Docker files
โœ” gnupg โ†’ verifies Docker packages

๐Ÿ”น Step 2: Add Dockerโ€™s Official GPG Key

This key ensures the Docker packages you download are authentic and safe.

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
sudo chmod a+r /etc/apt/keyrings/docker.gpg
Enter fullscreen mode Exit fullscreen mode

Think of this as Dockerโ€™s official signature stamp ๐Ÿ”

๐Ÿ”น Step 3: Add the Docker Repository

Tell your system where to fetch Docker from โ€” the official Docker source.

echo \
  "deb [arch=\"$(dpkg --print-architecture)\" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Enter fullscreen mode Exit fullscreen mode

Boom โ€” your system is now connected to the real Docker repo ๐ŸŒโœจ

๐Ÿ”น Step 4: Install Docker

The main event!
This installs all important Docker components:

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

๐ŸŽ‰ Docker is now officially installed on your machine.

๐Ÿณ What That Big Command Actually Installs

When you run that command, youโ€™re not just installing โ€œDockerโ€โ€ฆ
Youโ€™re installing five tiny superheroes that work together to power the Docker ecosystem ๐Ÿฆธโ€โ™‚๏ธ๐Ÿฆธโ€โ™€๏ธ

๐Ÿณ 1. docker-ce โ€” The Heart

The core engine running in the background, keeping containers alive.

๐Ÿ’ฌ 2. docker-ce-cli โ€” The Voice

The docker command you use.
You speak โ†’ the engine executes.

โš™๏ธ 3. containerd.io โ€” The Worker

Runs container processes.
Docker gives instructions โ†’ containerd gets it done.

๐Ÿ› ๏ธ 4. docker-buildx-plugin โ€” The Smart Builder

Builds images faster, cleaner, and even for different platforms.
(Like building ARM images on an Intel laptop โœจ)

๐Ÿงฉ 5. docker-compose-plugin โ€” The Team Manager

Got multiple services (backend + DB + cache)?
Compose runs them all together using a simple YAML file.

๐ŸŽ‰ Final Picture

These five components together =
Your machine becomes fully Docker-ready.
You can build, run, manage, and connect containers effortlessly.

Top comments (0)