moby--moby/api/types
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
..
backend daemon/logger: fix data race in LogFile 2022-03-03 14:56:25 -05:00
blkiodev
container API: add "signal" parameter to container stop and restart endpoints 2022-04-20 21:29:31 +02:00
events api/types/events: add "Type" type for event-type enum 2021-08-23 21:14:55 +02:00
filters api: filters: return correct status on invalid filters 2022-03-18 09:44:50 +01:00
image
mount
network
plugins/logdriver
registry
strslice
swarm client: Ping(): add handling for swarm status headers 2022-03-25 23:57:58 +01:00
time
versions
volume api: swagger: move VolumeCreateOptions to definitions 2022-03-05 22:20:25 +01:00
auth.go
client.go
configs.go
error_response.go
error_response_ext.go
graph_driver_data.go api: docs: update docs for /images/{name}/json (current API version) 2022-03-03 22:50:10 +01:00
id_response.go
image_delete_response_item.go
image_summary.go api: swagger: document ImageSummary fields 2022-04-20 12:09:08 +02:00
plugin.go
plugin_device.go
plugin_env.go
plugin_interface_type.go
plugin_mount.go
plugin_responses.go
port.go
service_update_response.go
stats.go
types.go api: swagger: document ImageSummary fields 2022-04-20 12:09:08 +02:00
volume.go