Docker allows you to run applications in lightweight, portable containers. Installing Docker on Ubuntu 26.04 (“Resolute Raccoon”) is straightforward when using the official Docker repository. This ensures you get the latest stable version with full support for Docker Compose and Buildx.
Prerequisites
- A fresh Ubuntu 26.04 LTS installation
- Sudo or root access
- Stable internet connection
- At least 2 GB RAM (recommended)
1. Update Your System
Start by updating the package index and upgrading existing packages.
sudo apt update && sudo apt upgrade -y
2. Install Required Dependencies
sudo apt install ca-certificates curl -y
3. Add Dockerβs Official GPG Key
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
4. Add the Docker APT Repository
echo \
“Types: deb”
“URIs: https://download.docker.com/linux/ubuntu”
“Suites: $(. /etc/os-release && echo $VERSION_CODENAME)”
“Components: stable”
“Signed-By: /etc/apt/keyrings/docker.asc” | \
sudo tee /etc/apt/sources.list.d/docker.sources > /dev/null
“Types: deb”
“URIs: https://download.docker.com/linux/ubuntu”
“Suites: $(. /etc/os-release && echo $VERSION_CODENAME)”
“Components: stable”
“Signed-By: /etc/apt/keyrings/docker.asc” | \
sudo tee /etc/apt/sources.list.d/docker.sources > /dev/null
5. Install Docker Engine
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
6. Start Docker Service
sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl enable docker
7. Run Docker as a Non-Root User (Recommended)
sudo usermod -aG docker $USER
Log out and log back in (or reboot) for the group change to take effect.
8. Verify Installation
Run the hello-world container:
docker run –rm hello-world
Common Docker Commands
- docker ps β List running containers
- docker images β List downloaded images
- docker pull nginx β Download an image
- docker run -d -p 8080:80 nginx β Run a container
- docker compose up -d β Start services from compose file
Tip: Always refer to the official Docker documentation for the most up-to-date instructions. To update Docker later, simply run sudo apt update && sudo apt upgrade.


