update_container
Update resource limits on a running container without recreating it. Changes take effect immediately on Linux cgroups.
Instructions
Update resource limits on a container without recreating it.
Changes take effect immediately on Linux (cgroups); not all fields are updatable on
every platform. Common updates keys: mem_limit (bytes, e.g. 134217728 for 128 MB),
memswap_limit (memory+swap in bytes; -1 = unlimited), cpu_shares (relative weight,
default 1024), cpu_period / cpu_quota (microseconds for CFS throttling),
cpuset_cpus (e.g. "0-1"), restart_policy (dict with Name such as
"on-failure"/"always"/"unless-stopped" and optional MaximumRetryCount). To change
image, env, or volumes the container must be recreated.
args: id_or_name - Container id or name to update updates - Resource fields to update; see description for valid keys returns: dict - The container's full attrs after the update
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes | ||
| id_or_name | Yes |