docker run --stop-timeout 30 myimage

Category: Docker

docker run --stop-timeout 30 myimage

Run with a 30-second stop grace period

Gives the container 30 seconds after SIGTERM before Docker sends SIGKILL on stop. Longer timeouts help apps that drain connections slowly. The value can be changed later with docker container update.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.