How to Install and Use Docker Compose on Ubuntu 25.10
Docker Compose is a tool for defining and running multi-container Docker applications using a single YAML configuration file.
Update Your System
First, make sure your package list is up to date:
apt update -y
apt upgrade -y
Install Docker (if not already installed)
apt install -y ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enable and start Docker:
systemctl enable docker
systemctl start docker
Install Docker Compose (Latest Version)
Docker Compose can be installed as a plugin (recommended) or manually.
Option 1: Install as Plugin (Preferred)
apt update
apt install -y docker-compose-plugin
Option 2: Install Manually (Latest Release from GitHub)
mkdir -p /usr/local/lib/docker/cli-plugins
curl -SL "https://github.com/docker/compose/releases/download/v2.39.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/lib/docker/cli-plugins/docker-compose
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
(The latest version as of writing is v2.39.4.) :contentReference[oaicite:0]{index=0}
Verify Docker Compose Installation
docker compose version
Output might look like:
Docker Compose version v2.40.2
Using Docker Compose
To start services defined in a docker-compose.yml file:
docker compose up -d
To stop and remove containers, networks, and volumes defined by the file:
docker compose down
That’s it! You’ve successfully installed the latest Docker Compose (v2.40.2) on Ubuntu 25.10.
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