Dockerfile instructions

Dockerfile STOPSIGNAL

Sets the initial stop request signal. Linux default is SIGTERM when not otherwise configured. Can be overridden per container; actual graceful termination requires process behavior testing. Image and container metadata do not establish actual signal handling or successful shutdown.

Formal Syntax & Structure

docker syntaxdocker
STOPSIGNAL <signal>

Parameters & Attributes

NameTypeDescription
signalstringSignal name or number.

Working Example

Example Snippetdocker
FROM busybox:1.37STOPSIGNAL SIGINTCMD ["echo", "signal metadata demo"]
Docker Reference