Jacar mascot — reading along A laptop whose eyes follow your cursor while you read.
Cómo Instalar

How to Install Docker on Ubuntu 22.04

How to Install Docker on Ubuntu 22.04

Actualizado: 2026-05-03

Docker[1] is the most widely used container platform: it lets you build, ship, and run applications in isolated and reproducible environments. It provides a secure and reliable platform for developing and distributing software independently of the underlying environment. This guide explains how to install Docker on Ubuntu 22.04 from the official repository.

Key takeaways

  • Always install from Docker’s official repository, not Ubuntu’s — this guarantees the most recent version.
  • Ubuntu 22.04 uses lsb_release -cs to detect the system codename (jammy) when adding the repository.
  • The Docker daemon is managed with systemctl; enabling docker.service at boot avoids having to start it manually.
  • Verify the installation with docker --version and systemctl status docker before proceeding with other components.

Pre-installation steps

Before starting, make sure your Ubuntu system is up to date:

bash
sudo apt update

Install the support packages needed to add external repositories:

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

Add the official Docker repository

Add Docker’s GPG key to verify package authenticity:

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

Register the official repository, automatically pointing to the installed Ubuntu version (on Ubuntu 22.04, lsb_release -cs returns jammy):

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

Update the package index so the system recognises the new repository:

bash
sudo apt update
Ubuntu 22.04 LTS (Jammy Jellyfish) logo, the reference operating system for this installation

Install Docker CE

Install Docker Community Edition:

bash
sudo apt install docker-ce

Configure the Docker daemon

The Docker daemon (dockerd) is the background process that manages all containers, images, networks, and volumes. Its configuration is defined in /etc/docker/daemon.json. To edit the configuration:

bash
sudo nano /etc/docker/daemon.json

Common configuration options include:

  • "log-driver": change the logging engine (defaults to json-file).
  • "default-address-pools": customise IP ranges for container networks.
  • "data-root": move Docker’s data directory to another partition.

After modifying the configuration file, restart the daemon to apply changes:

bash
sudo systemctl restart docker

Verify the installation

Check the installed version:

bash
docker --version

Verify the daemon is active and configured to start with the system:

bash
sudo systemctl status docker

The output should show active (running). If Docker doesn’t start automatically, enable it:

bash
sudo systemctl enable docker
Docker logo, container engine that isolates applications from the runtime environment

With Docker installed, the natural next steps are to install Docker Compose to orchestrate multi-container applications, or set up Traefik as a reverse proxy to expose services on the internet. For observability over container clusters, the post on Pixie for Kubernetes covers complementary tooling.

Conclusion

Installing Docker from the official repository on Ubuntu 22.04 ensures you always get the most stable and recent version, avoiding stale packages. With the daemon active and configured to start automatically, the environment is ready to build and run containers immediately.

Was this useful?
[Total: 0 · Average: 0]
  1. Docker

Written by

CEO - Jacar Systems

Passionate about technology, cloud infrastructure and artificial intelligence. Writes about DevOps, AI, platforms and software from Madrid.