Docker Compose
Compose project name (-p)
Select project identity explicitly. -p overrides environment and file-derived names. Project grouping is not a security boundary and cannot prevent collisions in shared host resources. Explicit project name does not select the Engine; check endpoint independently.
Formal Syntax & Structure
docker syntaxdocker
docker compose -p PROJECT COMMANDParameters & Attributes
| Name | Type | Description |
|---|---|---|
| PROJECT | string | Lowercase project name starting with letter or digit |
Working Example
Example Snippetdocker
docker compose -f compose.yaml -p bm-v12-a ps