LinuxCommandLibrary

docker-update

dynamically update container resource limits

TLDR

Update CPU limit

$ docker update --cpus [2] [container]
copy
Update memory limit
$ docker update --memory [512m] [container]
copy
Update restart policy
$ docker update --restart [always] [container]
copy
Update multiple containers
$ docker update --memory [1g] [container1] [container2]
copy
Remove memory limit
$ docker update --memory [0] [container]
copy

SYNOPSIS

docker update [options] container [container...]

DESCRIPTION

docker update dynamically updates container resource constraints. Allows changing CPU, memory, and restart settings without recreating the container.

PARAMETERS

--cpus decimal

Number of CPUs.
--memory -m bytes
Memory limit.
--memory-swap bytes
Swap limit (-1 for unlimited).
--restart string
Restart policy (no, on-failure, always, unless-stopped).
--cpu-shares int
CPU shares (relative weight).
--kernel-memory bytes
Kernel memory limit.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community