Oriel — AI & technology worth noticing, every day.

Docker Compose 5.6's jobs type only starts through docker compose run

Post · https://dev.to/alexgeorgiev17/docker-compose-56s-jobs-type-only-starts-through-docker-compose-run-4c1a

Docker Compose 5.6 added a jobs: section for one-off tasks. up, create and start all refuse to touch one, a scheduled trigger makes up fail outright, and only docker compose run actually starts a job, paying about 15% more when its dependency has to start cold.

First seen by Oriel on .

AI summary

Docker Compose 5.6.0 adds manually triggered jobs, but they can only be started with `docker compose run`; schedule triggers currently prevent the entire stack from starting.

  • A job requires a `triggers` block; `docker compose up` skips manual-only jobs with a warning, while `create` and `start` reject them.
  • Jobs run with `docker compose run`, start declared dependencies, pass their exit code through, and activate their own profiles automatically.
  • Two simultaneous runs create separate containers and execute independently; Compose provides no job locking or queuing.
  • Scheduled jobs are unsupported: adding a schedule trigger makes `up` fail before starting any services, while `manual: false` leaves a job with no available trigger.
  • The author recommends `run --rm`; jobs are omitted from `docker compose config --services`, and containers run without `--rm` share an existing cleanup limitation with profile-gated services.

#docker compose #containers #ci/cd

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Reactions

Total public reactions reported by the source; distinct from points and likes.

  • DEV Community: 31, latest observation ; +6 over observed period since

Comments

Comment count reported by the source.

  • DEV Community: 4, latest observation ; +2 over observed period since

Aliases

SourceExternal IDURL
DEV Community4865762https://dev.to/alexgeorgiev17/docker-compose-56s-jobs-type-only-starts-through-docker-compose-run-4c1a Read discussion