Docker

PID 1 ignores SIGTERM in Docker

DockerHealthcheck & SignalsSignalsadvanced

What this snippet does

Shell-form CMD makes /bin/sh PID 1, and sh does not forward SIGTERM to its child.

Expected output

container killed after 10s grace period

Why practise typing this

Typing healthcheck & signals code builds muscle memory for the symbols and indentation Docker uses most, which prose-based typing tests never cover. DevType measures your words per minute and accuracy on this snippet and tracks the individual characters you mistype, so later lessons can target them.

More Docker practice

Browse all Docker snippets →