What's Changed
ℹ️ Heads-up for users of Compose as a library:
Upnow runs its Create and Start phases as a single plan over a single daemon snapshot, forup -d(#14290) and interactiveup(#14305), asscale, watch rebuilds andstartalready do (#14291, #14296). The CLI behaves as before. If you callapi.Compose.Upfrom your own program:
Upnow validates its options first, with the same rules as the CLI flags:UpOptions.Validate()returns an*api.IncompatibleOptionsError(errors.Is(err, api.ErrIncompatibleOptions)) forStart.Waitcombined withStart.Attach, and for a detachedUp(noStart.Attach) combined withOnExit,ExitCodeFromorWatch. Those combinations used to be silently ignored (#14306).Upworks on the project it is given and ignoresStartOptions.Project.- The daemon is not observed again between the two phases: a container that exits after the plan is built is not started again, and one removed in between makes its start fail instead of being skipped. A planning error of the Start phase now fails before any container is created.
- A foreground
Upnow gives ause_api_socketservice its/run/secrets/docker/config.json, asup -ddoes, and shows the output ofpre_starthooks.- The keyboard menu of an interactive
upis no longer built by the library: setNavigationMenu: trueand pass an implementation withcompose.WithNavigationMenu(...), otherwise no menu is displayed and a warning says so (#14324).Other changes to the library surface in this release:
DownOptions.Imagesis now anapi.ImagePruneMode(untyped constants still compile, astringvariable needs a conversion) and an invalid value is rejected beforeDownremoves anything (#14149);compose.ServiceHash,compose.NetworkHashandcompose.VolumeHashare no longer exported, the helpers having moved to an internal package (#14405);api.Composeis now assembled from six smaller interfaces, with the same method set (#14322);PushOptions.IgnoreMissingis added.
✨ Improvements
Execution plan
- Feat: detached up runs on a single plan by @ndeloof in https://github.com/docker/compose/pull/14290
- Feat(up): interactive up runs on a single plan by @ndeloof in https://github.com/docker/compose/pull/14305
- Feat: scale and watch rebuild use the unified plan by @ndeloof in https://github.com/docker/compose/pull/14291
- Feat: compose start builds a start-only plan by @ndeloof in https://github.com/docker/compose/pull/14296
Commands
- Feat(run): --no-recreate reuses existing dependencies as-is by @ndeloof in https://github.com/docker/compose/pull/14144
- Feat(push): add --ignore-missing to skip images not available locally by @glours in https://github.com/docker/compose/pull/14341
- Feat(push): deprecate --ignore-push-failures in favor of --ignore-missing by @glours in https://github.com/docker/compose/pull/14354
- Feat(stats): add --all-projects and --aggregate flags by @glours in https://github.com/docker/compose/pull/14337
- Feat(network): let a service opt out of its name as a network alias by @glours in https://github.com/docker/compose/pull/14342
- Pass --parallel limit to bake as --jobs by @maxproske in https://github.com/docker/compose/pull/14352
Other
- Feat: support the umask service attribute by @ndeloof in https://github.com/docker/compose/pull/14367
- Use the Docker Desktop Hub session for Docker Hub registry credentials by @Benehiko in https://github.com/docker/compose/pull/14295

