Pause a container Run in API Explorer

POST /containers/{id}/pause

Use the freezer cgroup to suspend all processes in a container.

Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.

Path parameters

  • id string Required

    ID or name of the container

Responses

  • 204

    no error

  • 404 application/json

    no such container

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

POST /containers/{id}/pause
curl \
 --request POST 'http://api.example.com/v1.49/containers/{id}/pause'
Response examples (404)
{
  "message": "No such container: c2ada9df5af8"
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}