Tutorials / Docker

Install Docker Engine and Compose on Ubuntu 24.04

beginner25 minLast reviewed: 2026-07-15Target OS: Ubuntu 24.04 LTS

Written by uNode Engineering; reviewed by uNode Operations.

Repository, signing-key, package, Compose plugin, and docker-group security guidance reviewed against Docker's Ubuntu installation model.

Use Docker's signed repository instead of a convenience script so the installation and update path stays explicit. Remember that membership in the docker group is root-equivalent.

Illustration for How to Install Docker on Ubuntu 24.04

Prerequisites

  • Ubuntu 24.04 with sudo access.
  • Outbound HTTPS access.
  • At least 2 GB RAM for a small multi-container stack.
Open console server deploy

Step 1

Add Docker's repository

Install prerequisites, store the signing key, and add the repository for the server architecture.

apt update
apt install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list

Step 2

Install Engine and Compose

Install the engine, build and Compose plugins, then verify versions.

apt update
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
docker version
docker compose version

Step 3

Run a health check

Run the official hello-world image, inspect it, and remove the stopped container when finished.

docker run --name hello hello-world
docker logs hello
docker rm hello

Step 4

Choose an access model

Prefer sudo docker for small hosts. If you add an operator to the docker group, document that it grants root-equivalent control.

usermod -aG docker <admin-user>