Skip to main content

How to Install Docker and Docker Compose on Ubuntu 24.04

  • Monday, 15th June, 2026
  • 10:00am

Docker is the fastest way to run applications in reproducible environments. This guide installs the official Docker Engine and the Compose plugin on Ubuntu 24.04 LTS — the recommended setup for any NetVO cloud server or bare metal machine.

1. Remove old packages

for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do apt remove $pkg; done

2. Add Docker's official repository

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" | tee /etc/apt/sources.list.d/docker.list
apt update

3. Install Engine + Compose

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

4. Verify

docker run hello-world
docker compose version

5. Run Docker as a non-root user (optional)

usermod -aG docker deploy

Log out and back in for the group change to apply. Note: membership of the docker group is root-equivalent — only add trusted users.

6. A real Compose example

Save as compose.yaml and start with docker compose up -d:

services:
  app:
    image: ghcr.io/example/app:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:3000:3000"
  db:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_PASSWORD: change-me
    volumes:
      - dbdata:/var/lib/postgresql/data
volumes:
  dbdata:

Bind application ports to 127.0.0.1 and put a reverse proxy (Caddy, Nginx) in front — never expose a database port publicly.

ARM64 note

On our Arc ARM64 cloud servers these exact commands work unchanged — Docker's repository ships native arm64 builds, and most popular images are multi-arch today.

Happy shipping! For persistent workloads consider a Fusion dedicated-core plan so builds and containers never compete for CPU.

« Back