Docker Entrypoint: The Morning Checklist
A container entrypoint script starts socat, verifies it is alive, then hands PID 1 to Chrome with exec. Without exec, Chrome never receives SIGTERM.
The Morning Checklist
A container is a store. The entrypoint script is the morning checklist that Kubernetes runs once at startup.
PID 1 = The Manager Badge
Every container has one main process (PID 1). Kubernetes sends SIGTERM (“please close”) only to PID 1.
Without exec, Chrome never hears “please close.” Kubernetes waits 30 seconds, then kills everything.
Where Do the Arguments Come From?
The readiness probe runs wget http://127.0.0.1:9222/json/version every 15 seconds. This request goes through socat. If socat dies, the probe fails and Kubernetes removes the pod from DNS.
“exec does not run a program. It becomes that program.”
References:
Related: see the port contract and config chain that feeds these args, or go back to the series overview.