Skip to content

How to Install Docker on Ubuntu 26.04

Advertisement

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

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

5. Install Docker Engine

sudo apt update
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 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.

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Leave a Reply

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


Back to top