From f63d53c7365327c31c40ff9a871a6ea96fa8a6d0 Mon Sep 17 00:00:00 2001 From: Zhang Wei Date: Mon, 15 Aug 2016 16:38:47 +0800 Subject: [PATCH] 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 --- docs/reference/commandline/update.md | 4 ++++ man/docker-update.1.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/reference/commandline/update.md b/docs/reference/commandline/update.md index da7162848d..3eb2b7deac 100644 --- a/docs/reference/commandline/update.md +++ b/docs/reference/commandline/update.md @@ -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. diff --git a/man/docker-update.1.md b/man/docker-update.1.md index ad86297a07..71fb6e476a 100644 --- a/man/docker-update.1.md +++ b/man/docker-update.1.md @@ -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.