[release] v0.5.12-unstable

This commit is contained in:
Yann Stepienik 2023-05-28 12:25:11 +01:00
parent da883991d0
commit 76a95daf5b

View file

@ -239,7 +239,7 @@ func EditContainer(oldContainerID string, newConfig types.ContainerJSON, noLock
// only force hostname if network is bridge or default, otherwise it will fail
if newConfig.HostConfig.NetworkMode == "bridge" || newConfig.HostConfig.NetworkMode == "default" {
newConfig.Config.Hostname = newName
newConfig.Config.Hostname = newName[1:]
} else {
// if not, remove hostname because otherwise it will try to keep the old one
newConfig.Config.Hostname = ""