|
@@ -2,7 +2,7 @@
|
|
% Docker Community
|
|
% Docker Community
|
|
% JUNE 2014
|
|
% JUNE 2014
|
|
# NAME
|
|
# NAME
|
|
-docker-update - Update resource configs of one or more containers
|
|
|
|
|
|
+docker-update - Update configuration of one or more containers
|
|
|
|
|
|
# SYNOPSIS
|
|
# SYNOPSIS
|
|
**docker update**
|
|
**docker update**
|
|
@@ -17,15 +17,16 @@ docker-update - Update resource configs of one or more containers
|
|
[**-m**|**--memory**[=*MEMORY*]]
|
|
[**-m**|**--memory**[=*MEMORY*]]
|
|
[**--memory-reservation**[=*MEMORY-RESERVATION*]]
|
|
[**--memory-reservation**[=*MEMORY-RESERVATION*]]
|
|
[**--memory-swap**[=*MEMORY-SWAP*]]
|
|
[**--memory-swap**[=*MEMORY-SWAP*]]
|
|
|
|
+[**--restart**[=*""*]]
|
|
CONTAINER [CONTAINER...]
|
|
CONTAINER [CONTAINER...]
|
|
|
|
|
|
# DESCRIPTION
|
|
# DESCRIPTION
|
|
|
|
|
|
-The `docker update` command dynamically updates container resources. Use this
|
|
|
|
-command to prevent containers from consuming too many resources from their
|
|
|
|
-Docker host. With a single command, you can place limits on a single
|
|
|
|
-container or on many. To specify more than one container, provide
|
|
|
|
-space-separated list of container names or IDs.
|
|
|
|
|
|
+The `docker update` command dynamically updates container configuration.
|
|
|
|
+you can Use this command to prevent containers from consuming too many
|
|
|
|
+resources from their Docker host. With a single command, you can place
|
|
|
|
+limits on a single container or on many. To specify more than one container,
|
|
|
|
+provide space-separated list of container names or IDs.
|
|
|
|
|
|
With the exception of the `--kernel-memory` value, you can specify these
|
|
With the exception of the `--kernel-memory` value, you can specify these
|
|
options on a running or a stopped container. You can only update
|
|
options on a running or a stopped container. You can only update
|
|
@@ -33,6 +34,10 @@ options on a running or a stopped container. You can only update
|
|
stopped container, the next time you restart it, the container uses those
|
|
stopped container, the next time you restart it, the container uses those
|
|
values.
|
|
values.
|
|
|
|
|
|
|
|
+Another configuration you can change with this command is restart policy,
|
|
|
|
+new restart policy will take effect instantly after you run `docker update`
|
|
|
|
+on a container.
|
|
|
|
+
|
|
# OPTIONS
|
|
# OPTIONS
|
|
**--blkio-weight**=0
|
|
**--blkio-weight**=0
|
|
Block IO weight (relative weight) accepts a weight value between 10 and 1000.
|
|
Block IO weight (relative weight) accepts a weight value between 10 and 1000.
|
|
@@ -70,6 +75,9 @@ be updated to a stopped container, and affect after it's started.
|
|
**--memory-swap**=""
|
|
**--memory-swap**=""
|
|
Total memory limit (memory + swap)
|
|
Total memory limit (memory + swap)
|
|
|
|
|
|
|
|
+**--restart**=""
|
|
|
|
+ Restart policy to apply when a container exits (no, on-failure[:max-retry], always, unless-stopped).
|
|
|
|
+
|
|
# EXAMPLES
|
|
# EXAMPLES
|
|
|
|
|
|
The following sections illustrate ways to use this command.
|
|
The following sections illustrate ways to use this command.
|
|
@@ -91,3 +99,10 @@ To update multiple resource configurations for multiple containers:
|
|
```bash
|
|
```bash
|
|
$ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse
|
|
$ docker update --cpu-shares 512 -m 300M abebf7571666 hopeful_morse
|
|
```
|
|
```
|
|
|
|
+
|
|
|
|
+### Update a container's restart policy
|
|
|
|
+
|
|
|
|
+To update restart policy for one or more containers:
|
|
|
|
+```bash
|
|
|
|
+$ docker update --restart=on-failure:3 abebf7571666 hopeful_morse
|
|
|
|
+```
|