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.
docker
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.
Terminal
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.
docker-compose.yml
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.
Related guides
Docker Compose Profiles - Service Skipped / "no service selected" in CIFix Docker Compose services silently skipped because of profiles in CI - a service assigned a profile only ru…
Docker Compose "depends on undefined service" in CIFix Docker Compose "service <a> depends on undefined service <b>" in CI - a depends_on entry naming a service…
Docker Compose "dependency failed to start: container is unhealthy" in CIFix the Docker Compose "dependency failed to start: container ... is unhealthy" error in CI, where a depends_…