Skip to content
Latchkey

Docker Compose Profiles - Service Skipped / "no service selected" in CI

A Compose service assigned to a profiles: entry only starts when that profile is active. In CI the profile is often not enabled, so the service is silently skipped and downstream steps fail to reach it.

What this error means

A docker compose up starts only some services; a profiled one is missing, and a later step fails connecting to it. Or a command errors that no service matched the requested profile. No build error - the service was simply filtered out.

docker-compose.yml
services:
  e2e:
    profiles: ["test"]
# 'docker compose up' (no profile) starts nothing in the test profile:
# the 'e2e' service is skipped; connecting to it later fails

Common causes

The profile was not activated

A service under profiles: ["test"] only runs when --profile test or COMPOSE_PROFILES=test is set. A plain compose up excludes it by design.

Profile name mismatch

Activating --profile e2e while the service declares profiles: ["test"] activates nothing, so the service stays skipped.

A dependency is profiled but the dependent is not

A non-profiled service that depends_on a profiled one can fail because the dependency is filtered out unless its profile is active.

How to fix it

Activate the profile explicitly

Enable the profile via the flag or the environment variable.

Terminal
docker compose --profile test up -d
# or via env:
COMPOSE_PROFILES=test docker compose up -d

Align profile names and dependencies

  1. Make the --profile/COMPOSE_PROFILES value match the service’s declared profile exactly.
  2. Ensure any profiled dependency is in the same activated profile as its dependent.
  3. Run docker compose config --profile test to see which services are actually selected.

How to prevent it

  • Set COMPOSE_PROFILES (or --profile) in CI for any profiled services you need.
  • Keep profile names consistent between services and activation.
  • Validate the selected service set with docker compose config before up.

Frequently asked questions

What causes "profiled service not started"?
A service under profiles: ["test"] only runs when --profile test or COMPOSE_PROFILES=test is set. A plain compose up excludes it by design.
How do I fix profiled service not started?
Enable the profile via the flag or the environment variable.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card