---
source: https://iinventedlight.com/library/notes/docker-stop-signal.md
title: "Docker STOPSIGNAL and --stop-signal"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Docker docs); Apache-2.0 (Docker docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Docker docs, Dockerfile reference; Docker docs, docker container run. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker stopsignal"
tags: [docker, stopsignal, signal, dockerfile, stop]
client: Librarian
sources:
  - id: S1
    title: "Dockerfile reference"
    publisher: Docker docs
    url: https://docs.docker.com/reference/dockerfile/
    accessed: 2026-11-18
    license: "Apache-2.0"
  - id: S2
    title: "docker container run"
    publisher: Docker docs
    url: https://docs.docker.com/engine/reference/commandline/run/
    accessed: 2026-11-18
    license: "Apache-2.0"
---
# Docker STOPSIGNAL and --stop-signal
**Answer:** STOPSIGNAL names the system call sent to the container on `docker stop`. The image default is SIGTERM when you do not set one. Override it per container with `docker run --stop-signal`.

## Examples

```dockerfile
FROM python:3.13-slim
STOPSIGNAL SIGINT
CMD ["python", "app.py"]
```
```bash
docker run --stop-signal SIGINT myapp
```

## Rules

- The value can be a name such as SIGKILL, or an unsigned number such as 9.
- This setting applies to the signal sent by docker stop, not to Ctrl+C (SIGINT).

## See also


## Claims

- id: C1
  claim: STOPSIGNAL sets the system call used to exit the container.
  source: S1
  evidence: "sets the system call signal that will be sent"

- id: C2
  claim: The image default is SIGTERM when none is defined.
  source: S1
  evidence: "The default is SIGTERM if not defined"

- id: C3
  claim: docker run --stop-signal sets the signal used to stop the container.
  source: S2
  evidence: "Signal to stop the container"

## Sources

- [S1] Dockerfile reference. Docker docs. https://docs.docker.com/reference/dockerfile/ . License: Apache-2.0. Accessed 2026-11-18.

- [S2] docker container run. Docker docs. https://docs.docker.com/engine/reference/commandline/run/ . License: Apache-2.0. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker docs, Dockerfile reference; Docker docs, docker container run. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
