Docker Compose Multi-Container Orchestration

Docker Compose Multi-Container Orchestration

docs.docker.com

3

About this website

Docker Compose is a free and open-source tool for defining and running multi-container Docker applications. Originally developed by Docker Inc. (headquartered in San Francisco, California, founded by Solomon Hykes in 2013) as the Fig project (created by Aanand Prasad, Ben Firshman, and Orion Henry in 2013), Docker acquired Fig and rebranded it as Docker Compose. Compose uses a declarative YAML file (docker-compose.yml) to define all services, networks, and volumes of an application, which can then be started with a single command. Key features: declarative configuration: define multi-container applications in a single docker-compose.yml file, specifying services (containers), their images, environment variables, port mappings, volume mounts, network connections, dependencies, and health checks. Service definitions: each service specifies a Docker image or build context, command, entrypoint, environment variables, port mappings, volume mounts, network connections, resource limits (CPU, memory), restart policies, logging configuration, and Dockerfile build arguments. Networking: Compose automatically creates a default network and connects all services, enabling inter-service communication via service names as hostnames. Custom networks can be defined with drivers (bridge, overlay). Volumes: named volumes and bind mounts for persistent data storage, shared between services. Profiles: group services into profiles for selective startup (e.g., development vs production). Override files: docker-compose.override.yml for environment-specific configurations. Environment files (.env) for variable substitution. Commands: docker compose up (start all services), docker compose down (stop and remove), docker compose logs, docker compose exec, docker compose build, docker compose scale. Compose v2 (Go-based, integrated into Docker CLI) replaces the original Python-based Compose v1. Used in development, CI/CD, and production (with Docker Swarm). Apache-2.0.

Tags & Categories

Tags

Statistics

3
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!