How to Install Docker on Ubuntu 26.04 LTS

Docker

By Jennifer Webb

Updated on Jun 29, 2026

How to Install Docker on Ubuntu 26.04 LTS

In this guide, you'll install the latest Docker Engine on Ubuntu 26.04 LTS using Docker's official repository. This method ensures you always receive the newest stable releases directly from Docker.

What is Docker?

Docker is an open source platform that lets you package applications and their dependencies into lightweight containers. These containers run the same way on any system, making it easier to develop, test, and deploy applications without worrying about differences between environments.

Before You Begin

Make sure you have:

  • Ubuntu 26.04 LTS installed dedicated server.

  • A user account with sudo privileges

  • An active internet connection

Let's start learning how to install Docker on Ubuntu 26.04 LTS

Step 1: Update Your System

Start by updating your package list.

sudo apt update

This refreshes Ubuntu's package database so your system knows about the latest available software.

Step 2: Install Required Packages

Docker needs a few packages before it can be installed.

sudo apt install ca-certificates curl

These packages allow Ubuntu to securely download software from external repositories.

Step 3: Create the Docker Keyring Directory

Create a directory where Ubuntu will store Docker's security key.

sudo install -m 0755 -d /etc/apt/keyrings

This command only creates the directory if it doesn't already exist.

Step 4: Download Docker's Official GPG Key

Run the following command.

sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc

Now give Ubuntu permission to read the key.

sudo chmod a+r /etc/apt/keyrings/docker.asc

The GPG key helps Ubuntu verify that Docker packages are authentic and haven't been modified.

Step 5: Add the Official Docker Repository

Add Docker's official package repository to Ubuntu.

sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF

Ubuntu will now know where to download the latest Docker packages.

Step 6: Refresh the Package List

Since a new repository has been added, update the package database again.

sudo apt update

Step 7: Install Docker

Install Docker Engine along with Docker Compose and Buildx.

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

This installs everything required to start working with Docker.

Step 8: Verify the Installation

Check whether Docker is installed correctly.

docker --version

You should see output similar to this.

Docker version 29.x.x

The exact version number may change as Docker releases updates.

Step 9: Test Docker

Run Docker's official test container.

sudo docker run hello-world

If everything is working correctly, Docker downloads a small test image and prints a success message.

Congratulations! Docker is now installed and working on your Ubuntu server.

Optional: Run Docker Without sudo

By default, Docker commands require sudo.

If you don't want to type sudo every time, add your user to the Docker group.

sudo usermod -aG docker $USER

Apply the change by logging out and logging back in.

You can also run:

newgrp docker

Now test it.

docker run hello-world

If the container runs successfully without sudo, the configuration is complete.

Check Docker Service Status

To verify that Docker is running, use:

sudo systemctl status docker

If the service isn't running, start it with:

sudo systemctl start docker

To make Docker start automatically after every reboot, run:

sudo systemctl enable docker

Useful Docker Commands

Check Docker version.

docker --version

Check Docker Compose version.

docker compose version

View running containers.

docker ps

View all containers.

docker ps -a

List downloaded images.

docker images

Conclusion

In this tutorial we've learnt how to install Docker on Ubuntu 26.04 LTS and it only takes a few minutes when using Docker's official repository. This installation method gives you the latest stable Docker Engine, Docker Compose, and Buildx, making it the recommended choice for both development and production servers.

Your system is now ready to build, run, and manage containers with Docker.