GoDoxy

Stop container

POST
/docker/stop

Stop container by container id

Request Body

Request

application/json
  1. body
id*string
signal?string

Signal (optional) is the signal to send to the container to (gracefully) stop it before forcibly terminating the container with SIGKILL after the timeout expires. If not value is set, the default (SIGTERM) is used.

timeout?integer

Timeout (optional) is the timeout (in seconds) to wait for the container to stop gracefully before forcibly terminating it with SIGKILL.

  • Use nil to use the default timeout (10 seconds).
  • Use '-1' to wait indefinitely.
  • Use '0' to not wait for the container to exit gracefully, and immediately proceeds to forcibly terminating the container.
  • Other positive values are used as timeout (in seconds).

Response Body

OK

application/json
  1. response
details?|null
message?string
Example Request
curl -X POST 'https://example.com/api/v1/docker/stop' \  -H 'Content-Type: application/json' \  -d '{  "id": "string"}'
Example Response
{  "details": {    "property1": null,    "property2": null  },  "message": "string"}