compose/pkg/api
Guillaume Lours 0aff61809c run: trigger a job through the engine like a service
`docker compose run <job>` triggers a run of the job on the engine,
starts its dependencies first, streams its logs and returns its exit
code like a one-off service; a job accepts manual triggering unless it
declares manual: false. A scheduled job runs as up registered it: an
override, or a job up never registered, is refused. A manual job is
removed from the engine after its run, so the next run can differ. When
the engine cannot run jobs, run falls back to a one-off service with a
warning. --detach is refused, an interrupted run is cancelled, a dry run
only reports it. A job named by create, start, build, pull or push gets
an error naming run instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-11-17 13:48:57 +01:00
..
api.go run: trigger a job through the engine like a service 2026-11-17 13:48:57 +01:00
api_test.go build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
context.go Introduce abstractions to support SDK usage without requiring Docker CLI 2025-10-27 16:17:50 +01:00
create_options.go feat(api): reject an unknown recreate policy instead of treating it as diverged 2026-11-16 17:01:39 +01:00
create_options_test.go fix(up): keep handling Ctrl+C once the log monitor has ended 2026-11-17 09:35:33 +01:00
doc.go fix(up): keep handling Ctrl+C once the log monitor has ended 2026-11-17 09:35:33 +01:00
env.go restore support for COMPOSE_COMPATIBILITY 2025-12-07 18:42:04 +01:00
errors.go run: trigger a job through the engine like a service 2026-11-17 13:48:57 +01:00
errors_test.go feat(api): a typed error for a service with no running container 2026-11-16 17:01:39 +01:00
event.go docs(api): state that EventProcessor.Done reports cancellation as failure 2026-11-16 14:34:24 +01:00
feature.go refactor(up): inject the navigation menu instead of importing cmd/formatter 2026-10-12 10:50:38 +02:00
labels.go jobs: register scheduled jobs on create and up, remove them on down 2026-11-17 13:48:57 +01:00
labels_test.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
up_options.go fix(up): keep handling Ctrl+C once the log monitor has ended 2026-11-17 09:35:33 +01:00
up_options_test.go feat(up): stream the logs while --wait waits for the services 2026-11-17 09:35:33 +01:00