How to Install Docker on Ubuntu 26.04

What is Docker?

Docker is a container engine that uses Linux kernel features (like namespaces and control groups) to create lightweight, portable, and isolated environments called containers.
It helps to create, deploy, and run applications easily across different environments.

Install Docker

Install Docker and Docker Compose using the apt package manager:

apt install docker.io docker-compose -y

Enable and start the Docker service immediately:

systemctl enable --now docker

Verify if Docker is active and running:

systemctl status docker

Output:

root@server:~# systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: e>
     Active: active (running) since Mon 2026-04-27 19:20:26 UTC; 28s ago
 Invocation: e95e5cf9ed5443979fa06fa4cdb11c3f
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 9660 (dockerd)
      Tasks: 9
     Memory: 26.3M (peak: 26.8M)
        CPU: 1.053s
     CGroup: /system.slice/docker.service
             └─9660 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/cont

Create Docker Group

To manage Docker as a non-root user, create a docker group:

groupadd docker

Add your user to the docker group:

usermod -aG docker $USER

If adding a different user, replace $USER with the actual username.

Check the installed Docker version:

docker --version

Output:

root@server:~# docker --version
Docker version 29.1.3, build 29.1.3-0ubuntu4

Test Docker Installation

Run the hello-world test container:

docker run hello-world

Output:

root@server:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
...
Hello from Docker!
This message shows that your installation appears to be working correctly.

🎉 Done! Docker is successfully installed and running on Ubuntu 26.04.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS