fix: (#2075)
network-scoped alias is supported only for containers in user defined networks Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
18b4714e38
commit
74b0fe8ba9
|
@ -447,7 +447,9 @@ func (cr *containerReference) create(capAdd []string, capDrop []string) common.E
|
|||
|
||||
var networkingConfig *network.NetworkingConfig
|
||||
logger.Debugf("input.NetworkAliases ==> %v", input.NetworkAliases)
|
||||
if hostConfig.NetworkMode.IsUserDefined() && len(input.NetworkAliases) > 0 {
|
||||
n := hostConfig.NetworkMode
|
||||
// TODO: use IsUserDefined() once it's windows implementation matches the unix one
|
||||
if !n.IsDefault() && !n.IsBridge() && !n.IsHost() && !n.IsNone() && !n.IsContainer() && len(input.NetworkAliases) > 0 {
|
||||
endpointConfig := &network.EndpointSettings{
|
||||
Aliases: input.NetworkAliases,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue