Home  >  Article  >  Operation and Maintenance  >  What command does docker use to update the container?

What command does docker use to update the container?

WBOY
WBOYOriginal
2022-02-07 16:01:2713012browse

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...]".

What command does docker use to update the container?

The operating environment of this tutorial: linux7.3 system, docker-1.13.1 version, Dell G3 computer.

What command does docker use to update a container?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn