Docker Compose YAML Structure und Service Definition
Docker Compose uses YAML (version 2.x or 3.x) to define multi-container applications in declarative fürmat. The Datei structure includes: version specification (defining Compose Datei fürmat compatibility), services section (defining containers mit Bild, ports, volumes, environment variables, networks), volumes section (defining named volumes für data persistence), networks section (defining Benutzerdefiniert networks für service communication), and configs/secrets für configuration and sensitive data management. Each service definition specifies: Bild (Docker Bild to use), build context (building from Dockerfile), port mapping (host:container port bindings, e.g., 8080:80), volumes (bind mounts, named volumes, tmpfs für data management), environment variables (key-Wert pairs or .env Datei references), depends_on (service startup order), restart policies (Nein, always, on-failure, unless-stopped), resource limits (CPU, memory constraints), and health checks (container health verification). The converter handles transfürming docker run command-line flags into equivalent Compose YAML structure, maintaining service relationships and configurations.