Install and use Docker Compose

docker

Updated August 29, 2026

Modern Docker Compose is a Docker CLI plugin and is invoked as docker compose with a space. Check what is available before installing another copy:

docker compose version
docker version

On Docker Desktop, Compose is included. On Linux Engine installations, install the Compose plugin using Docker's current instructions for your distribution. The standalone docker-compose command is legacy syntax in many older guides; a project may still use it, but do not assume that installing an unrelated Python package is the right fix.

A minimal check:

services:
  web:
    image: nginx:alpine
    ports:
      - "8080:80"

Save it as compose.yaml, then run docker compose up -d and inspect with docker compose ps. Keep the Compose file's version-neutral current syntax, pin images deliberately, and never put secrets directly into a file that will be committed. Compose orchestrates a project on one Docker host; it is not a Kubernetes replacement.

Sources

related.

Ruslan Osipov

Ruslan Osipov

About the author