mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Fix update clear the restart policy of monitor
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
@@ -67,7 +67,9 @@ func (daemon *Daemon) update(name string, hostConfig *container.HostConfig) erro
|
||||
}
|
||||
|
||||
// if Restart Policy changed, we need to update container monitor
|
||||
container.UpdateMonitor(hostConfig.RestartPolicy)
|
||||
if hostConfig.RestartPolicy.Name != "" {
|
||||
container.UpdateMonitor(hostConfig.RestartPolicy)
|
||||
}
|
||||
|
||||
// If container is not running, update hostConfig struct is enough,
|
||||
// resources will be updated when the container is started again.
|
||||
|
||||
Reference in New Issue
Block a user