Is this a docs issue?
Type of issue
Other
Description
It might be helpful to clarify in the documentation that the STOPSIGNAL instruction is specifically used when a container is stopped via docker stop.
Currently, someone might assume that this signal is also used when stopping a foreground container with Ctrl + C, but in that case, the signal sent is actually SIGINT, not the one specified via STOPSIGNAL.
Since both docker stop and Ctrl + C can be used to terminate a container, this detail might be confusing at first glance. Explicitly noting the difference in signal handling would help avoid misunderstandings.
Location
https://docs.docker.com/reference/dockerfile/
Suggestion
The STOPSIGNAL instruction sets the system call signal that will be sent to the container to exit with `docker container stop` or `docker stop`. This signal can be a signal name in the format SIG<NAME>, for instance SIGKILL, or an unsigned number that matches a position in the kernel's syscall table, for instance 9. The default is SIGTERM if not defined.
The image's default stopsignal can be overridden per container, using the --stop-signal flag on docker run and docker create
Is this a docs issue?
Type of issue
Other
Description
It might be helpful to clarify in the documentation that the
STOPSIGNALinstruction is specifically used when a container is stopped viadocker stop.Currently, someone might assume that this signal is also used when stopping a foreground container with
Ctrl + C, but in that case, the signal sent is actuallySIGINT, not the one specified viaSTOPSIGNAL.Since both
docker stopandCtrl + Ccan be used to terminate a container, this detail might be confusing at first glance. Explicitly noting the difference in signal handling would help avoid misunderstandings.Location
https://docs.docker.com/reference/dockerfile/
Suggestion