whatis docker-compose

Docker Compose

Also known as: compose.yaml, docker-compose.yml

A tool for defining multi-container apps in one YAML file and starting them together with docker compose up.

What Is Docker Compose in Linux?

A compose.yaml file lists services, their images, ports, volumes, environment variables, and networks. One command brings the whole stack up, and containers can reach each other by service name.

Most self-hosted apps publish a Compose file as their recommended install method. Podman supports the same files through podman compose.

Example

services:
  app:
    image: ghcr.io/example/app:latest
    ports: ["127.0.0.1:8080:8080"]
    restart: unless-stopped