GeezerVison is showing github.com — SIGINT/SIGTERM ignored during startup phase & healthcheck wait in foreground up · Issue #165 · Mcrich23/Container-Compose
SIGINT/SIGTERM ignored during startup phase & healthcheck wait in foreground up #165DescriptionWhen running container-compose up in the foreground (without -d), sending SIGINT (Ctrl+C / kill -2 $PID) or SIGTERM from an external process (e.g. CI runner, test script, wrapper task, or another shell) is ignored or
fails to stop the stack if the signal arrives while containers are starting up, pulling images, or waiting for healthchecks.
Additionally, in piped/redirected environments, output is block-buffered, so shutdown feedback (`Gracefully stopping...`) is not visible until the process exits.
Repro
- Create a
docker-compose.yml with a service that takes time during startup (e.g., an image that needs to be pulled or has a 20s healthcheck):
services:
web:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
retries: 5
start_period: 20s
and it doesnt listen to ctrl+c Activitygeorgettica commented on Nov 2, 2026 need to find the case that works Mcrich23 commented on Nov 2, 2026 Yes, sending SIGTERM to container-compose when running up has never been supported since I have been unable to identify how to track it in swift and manage a graceful shutdown. Apologies for the lack of documentation regarding this. The current way is just SIGTERM and then container-compose down.
If you know of a way, I would love to get a PR up and then merged for this. georgettica commented on Nov 2, 2026 amazing! I will test locally, see it works and create a PR georgettica commented on Nov 2, 2026 I just tried to simplify the setup to redact my stuff. so I closed as it didnt reproduce (uploaded and then tried what I wrote) georgettica commented on Nov 2, 2026 Reacted by Morris Richman Reacted by Ron Green
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|