Commit 9518acd
Revert "Forward SIGTERM to children in Dockerfile CMD"
This reverts commit 1bd5e86.
The trap addition was incomplete. On the shutdown signal (Control
Plane sends SIGINT per docs.controlplane.com/reference/workload/termination.md),
the trap fires, `wait -n` returns 130, and `exit 1` then runs
unconditionally. The container exits with code 1 on every rolling
deploy instead of a code that reflects the signal-initiated shutdown.
More importantly, the trap was trying to solve a problem Control Plane
already handles. CP's default preStop hook runs `sh -c "sleep 45"`
before any signal reaches PID 1, and the sidecar stops accepting new
inbound connections ~80 seconds ahead of termination. That sleep plus
the routing drain is the graceful-shutdown window; signal forwarding
inside the container is marginal on top of it.
Match the reference deployments verbatim: the react-on-rails-demo-
marketplace-rsc Dockerfile and the hichee production Dockerfile both
use this exact bash-c pattern without a trap. If deeper graceful
shutdown is ever needed, the right tool is extending preStop or
switching to a process manager (overmind, tini), not a bash trap on
wait -n.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1bd5e86 commit 9518acd
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 86 | + | |
| 87 | + | |
0 commit comments