Docker Compose "profile not enabled" in CI
A service tagged with profiles: only starts when that profile is activated via --profile or COMPOSE_PROFILES. In CI a service tucked behind a profile is silently skipped - and any step depending on it fails because the container never came up.
What this error means
A docker compose up brings up some services but not a profiled one, and a later step fails referencing the missing service, or compose run reports it as not started.
service "integration-tests" was not started because its profile "ci" is not enabledCommon causes
The profile was not activated
A service under profiles: [ci] stays inactive unless --profile ci or COMPOSE_PROFILES=ci is set.
A typo or mismatched profile name
Activating test while the service declares tests leaves it disabled.
How to fix it
Activate the profile explicitly
- Pass
--profile(or setCOMPOSE_PROFILES) for the profiles the job needs.
docker compose --profile ci up -d
# or:
COMPOSE_PROFILES=ci docker compose up -dAlign profile names
- Make the activated profile match the name declared on the service.
services:
integration-tests:
profiles: ["ci"]
image: myorg/tests:ciHow to prevent it
- Set
COMPOSE_PROFILESin the CI environment for the profiles you rely on. - Keep profile names consistent between the file and the activation flag.