Skip to main content
STOPSIGNAL has no effect on Windows containers because they do not support POSIX signals.

Description

Windows containers do not support POSIX signals. BuildKit defines a CheckPlatform() method on StopSignalCommand that rejects it on Windows, but this check is never called in the dispatch path (dead code). The STOPSIGNAL instruction is silently accepted and written to the image config, but has no effect at runtime. This rule catches the useless instruction at lint time so authors can remove it or understand that it will be ignored.

Why this matters

  • Silent no-op — the build succeeds but the instruction does nothing on Windows
  • Misleading config — other maintainers may assume the signal is in effect
  • Dead code in BuildKit — the platform check exists but is never called, so there is no build-time warning from Docker itself

Examples

Violation

No violation

Auto-fix

The auto-fix comments out the instruction using the standard tally comment-out pattern:

Configuration

This rule has no rule-specific options.

References