1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Update RestartPolicy of container

Add `--restart` flag for `update` command, so we can change restart
policy for a container no matter it's running or stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
Zhang Wei
2016-01-04 23:58:20 +08:00
parent 6668326aa8
commit ff3ea4c90f
17 changed files with 154 additions and 33 deletions

View File

@ -322,7 +322,8 @@ func (s *containerRouter) postContainerUpdate(ctx context.Context, w http.Respon
}
hostConfig := &container.HostConfig{
Resources: updateConfig.Resources,
Resources: updateConfig.Resources,
RestartPolicy: updateConfig.RestartPolicy,
}
name := vars["name"]