Home > Article > Operation and Maintenance > What command does docker use to update the container?
In docker, you can use the update command to update the container configuration. This command is used to update the configuration of one or more containers. The syntax is "docker update [OPTIONS] CONTAINER [CONTAINER...]".
The operating environment of this tutorial: linux7.3 system, docker-1.13.1 version, Dell G3 computer.
Update the configuration of one or more containers.
Syntax
docker update [OPTIONS] CONTAINER [CONTAINER...]
OPTIONS Description
Name Description
--blkio-weight blocking IO (relative weight), between 10 and 1000, 0 means disabled (default disabled)
--cpu-period Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota Limit CPU CFS (Completely Fair Scheduler) Quota
--cpu-rt-period API 1.25, limit CPU real-time time to microseconds
--cpu-rt-runtime API 1.25, limit CPU real-time runtime to microseconds
--cpu-shares, -c CPU shares (relative weight)
--cpus API 1.29, number of CPUs
--cpuset-cpus CPU allowed to execute ( 0-3, 0,1)
--cpuset-mem MEM allowed to execute (0-3, 0,1)
--kernel-memory kernel memory limit
--memory-swap swap limit equals memory plus swap, "-1" to enable unlimited swap
--memory-reservatio memory soft limit
--memory, -m memory limit
--pids-limit API 1.40, adjust the container pids limit (-1 means no limit)
--restart Restart the policy when the container exits to apply
Instance
Update the number of CPU shares
# f361b7d8465 为 容器ID docker update --cpu-shares 512 f361b7d8465
Update the restart strategy of the container
docker update --restart=always f361b7d8465
Update the container memory
docker update -m 500M f361b7d8465
Recommended study: "docker video tutorial》
The above is the detailed content of What command does docker use to update the container?. For more information, please follow other related articles on the PHP Chinese website!