Skip to content

up without -d fails: "no runtime client exists: container is stopped" #131

Description

@Cyb3rDudu

container-compose up without -d starts the first container, then exits 1.

Repro (minimal)

services:
  hi:
    image: alpine:latest
    command: ["sleep", "infinity"]

container-compose up (no -d) →

Error: no runtime client exists: container is stopped

Exit 1, no container left running. up -d works fine.

Context

The entire foreground-wait machinery (runForegroundUntilStopped / waitUntilAllContainersStopped) is new since 1.0.0 (added in #127). The -d flag is only appended to container run when detach is set (ComposeUp.swift:818), so foreground mode runs container run attached rather than detached — the failure is somewhere in that start/wait path.

The -d help text (ComposeUp.swift:73) is also now stale: it still says "If you do NOT detach, killing this process will NOT kill the container," but #127 made foreground mode try to stop containers on signal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions