Docker Compose
Compose services
Top-level service map describing container configuration. Each key identifies a logical service, not a container ID. Runtime configuration can differ even if images are shared. The command override does not remove inherited ENTRYPOINT.
Formal Syntax & Structure
docker syntaxdocker
services: { SERVICE: { image: IMAGE } }Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| SERVICE | string | Service key |
| IMAGE | string | Reviewed local image reference |
Working Example
Example Snippetdocker
services: worker: image: busybox:1.37 pull_policy: never