1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/api
Sebastiaan van Stijn 83a185897d
API: add "signal" parameter to container stop and restart endpoints
Containers can have a default stop-signal (`--stop-signal` / `STOPSIGNAL`) and
timeout (`--stop-timeout`). It is currently not possible to update either of
these after the container is created (`docker update` does not allow updating
them), and while either of these can be overridden through some commands, we
currently do not have a command that can override *both*:

command         | stop-signal | stop-timeout | notes
----------------|-------------|--------------|----------------------------
docker kill     | yes         | DNA          | only sends a single signal
docker restart  | no          | yes          |
docker stop     | no          | yes          |

As a result, if a user wants to stop a container with a custom signal and
timeout, the only option is to do this manually:

    docker kill -s <custom signal> mycontainer
    # wait <desired timeout>
    # press ^C to cancel the graceful stop
    # forcibly kill the container
    docker kill mycontainer

This patch adds a new `signal` query parameter to the container "stop" and
"restart" endpoints. This parameter can be added as a new flag on the CLI,
which would allow stopping and restarting with a custom timeout and signal,
for example:

    docker stop --signal=SIGWINCH --time=120 mycontainer

    docker restart --signal=SIGWINCH --time=120 mycontainer

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-20 21:29:31 +02:00
..
v1.18.md
v1.19.md
v1.20.md
v1.21.md
v1.22.md
v1.23.md
v1.24.md
v1.25.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.26.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.27.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.28.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.29.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.30.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.31.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.32.yaml Merge pull request #41060 from grooverdan/dock-api-fix-create-image 2022-03-18 19:02:30 +01:00
v1.33.yaml Merge pull request #41060 from grooverdan/dock-api-fix-create-image 2022-03-18 19:02:30 +01:00
v1.34.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.35.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.36.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.37.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.38.yaml docs: cleanup swagger API with multiple examples (v1.25-v1.41) 2022-03-15 16:12:49 +01:00
v1.39.yaml docs: api: document ImageSummary fields (api v1.39-v1.41) 2022-04-20 12:10:17 +02:00
v1.40.yaml docs: api: document ImageSummary fields (api v1.39-v1.41) 2022-04-20 12:10:17 +02:00
v1.41.yaml docs: api: document ImageSummary fields (api v1.39-v1.41) 2022-04-20 12:10:17 +02:00
version-history.md API: add "signal" parameter to container stop and restart endpoints 2022-04-20 21:29:31 +02:00