mirror of https://github.com/docker/cli.git
Forbid update restart policy of container with AutoRemove flag
"--restart" and "--rm" are conflict options, if a container is started with AutoRemove flag, we should forbid the update action for its Restart Policy. Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
b5c313651f
commit
f63d53c736
|
@ -107,3 +107,7 @@ To update restart policy for one or more containers:
|
|||
```bash
|
||||
$ docker update --restart=on-failure:3 abebf7571666 hopeful_morse
|
||||
```
|
||||
|
||||
Note that if the container is started with "--rm" flag, you cannot update the restart
|
||||
policy for it. The `AutoRemove` and `RestartPolicy` are mutually exclusive for the
|
||||
container.
|
||||
|
|
|
@ -148,3 +148,7 @@ To update restart policy for one or more containers:
|
|||
```bash
|
||||
$ docker update --restart=on-failure:3 abebf7571666 hopeful_morse
|
||||
```
|
||||
|
||||
Note that if the container is started with "--rm" flag, you cannot update the restart
|
||||
policy for it. The `AutoRemove` and `RestartPolicy` are mutually exclusive for the
|
||||
container.
|
||||
|
|
Loading…
Reference in New Issue