Merge pull request #30090 from wangxing1517/fix-rename-error-when-sid-is-empty
Fix rename error when sid is empty Upstream-commit: c06a82490400114d8f61670271ce5f84ffc14778 Component: engine
This commit is contained in:
@@ -106,7 +106,7 @@ func (daemon *Daemon) ContainerRename(oldName, newName string) error {
|
||||
}()
|
||||
|
||||
sid = container.NetworkSettings.SandboxID
|
||||
if daemon.netController != nil {
|
||||
if sid != "" && daemon.netController != nil {
|
||||
sb, err = daemon.netController.SandboxByID(sid)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user