Docker · Option
profiles
Docker Compose profiles turn optional services on or off for different uses. Services without profiles always run; profiled services run when their profile is enabled or they are explicitly targeted.
Last updated
Syntax
services:
service_name:
profiles: [profile_name]
docker compose --profile PROFILE up
COMPOSE_PROFILES=PROFILE docker compose upIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
profiles attributeCOMPOSE_PROFILESdepends_ondocker compose updocker compose downdocker compose run