Skip to content
Latchkey

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 enabled

Common 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

  1. Pass --profile (or set COMPOSE_PROFILES) for the profiles the job needs.
Terminal
docker compose --profile ci up -d
# or:
COMPOSE_PROFILES=ci docker compose up -d

Align profile names

  1. Make the activated profile match the name declared on the service.
docker-compose.yml
services:
  integration-tests:
    profiles: ["ci"]
    image: myorg/tests:ci

How to prevent it

  • Set COMPOSE_PROFILES in the CI environment for the profiles you rely on.
  • Keep profile names consistent between the file and the activation flag.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →