Update a service's resource limits (memory, CPU caps).
Changed onPersists the new caps to the encrypted config AND live-applies them via Docker's update API. Memory and CPU can be hot-changed without a restart on running containers; stopped containers also accept the update and pick up the new caps on next start.
Pass null (or omit) any field to leave it unlimited. A request where every field is null removes any existing limits.
The response includes a per-container applied[] list so the caller can tell which members got the update and which were skipped (e.g., container not yet created, or docker update rejected because the new memory cap is below current usage).
Request
- Base URL/api (relative, and the document was published on a file host, not at the API’s origin)
- Authnone declared
Path parameters
External service ID
Request body
Response
Updated resource limits
Changes
- info
added the optional property
shm_not_appliedto the response with the status
- info
- info
added the new optional request property
shm_size_mb - info
added the optional property
limits/shm_size_mbto the response with the status
- info