mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
runconfig: deprecate SetDefaultNetModeIfBlank
Remove uses of this function and mark it deprecated. There's no known consumers of this function, but let's stay on the safe side, and mark it deprected for 1 release. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/containerd/log"
|
||||
containertypes "github.com/docker/docker/api/types/container"
|
||||
networktypes "github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/docker/api/types/strslice"
|
||||
"github.com/docker/docker/container"
|
||||
"github.com/docker/docker/daemon/config"
|
||||
@@ -19,7 +20,6 @@ import (
|
||||
"github.com/docker/docker/oci/caps"
|
||||
"github.com/docker/docker/opts"
|
||||
"github.com/docker/docker/pkg/system"
|
||||
"github.com/docker/docker/runconfig"
|
||||
volumemounts "github.com/docker/docker/volume/mounts"
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/moby/sys/signal"
|
||||
@@ -218,7 +218,9 @@ func (daemon *Daemon) setHostConfig(container *container.Container, hostConfig *
|
||||
return err
|
||||
}
|
||||
|
||||
runconfig.SetDefaultNetModeIfBlank(hostConfig)
|
||||
if hostConfig != nil && hostConfig.NetworkMode == "" {
|
||||
hostConfig.NetworkMode = networktypes.NetworkDefault
|
||||
}
|
||||
container.HostConfig = hostConfig
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user