mirror of
https://github.com/docker/compose.git
synced 2026-11-17 13:45:39 +00:00
Interactive up used to create() the project, then start() it: two daemon snapshots, the second built from the project as the caller gave it rather than the canonical one the Create phase ran on. It now prepares one Create+Start plan, like detached up. The Create phase runs under the "up" progress scope, then the attach/printer/ monitor session is set up exactly as before, and the Start phase is dispatched last, outside that scope, on a context that survives Ctrl+C, with the printer as the hook-log listener. A failed Create phase reaches neither the session nor the Start phase, and a dry run only ever runs the Create phase. The monitor's starting point is the daemon's time, which is read right before the Start phase: a daemon that answers with a time that can't be used fails the up with an explicit error, with no container started. One that can't be asked at all (a read-only socket proxy without the info endpoint) doesn't: the monitor then follows live events, with a warning. The session, the watcher and the teardown now use the plan's own project, which carries what preparation resolved. That makes use_api_socket work in a foreground up: its config file lives only in that project. A scenario locks it. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
6 lines
206 B
YAML
6 lines
206 B
YAML
services:
|
|
app:
|
|
image: alpine
|
|
use_api_socket: true
|
|
command: >
|
|
sh -c 'if [ -f /run/secrets/docker/config.json ]; then echo apisocket-config-present; else echo apisocket-config-absent; fi'
|