mirror of https://github.com/docker/cli.git
2030 fixed link when bridge stated
Signed-off-by: Wojciech Kosowicz <pcellix@gmail.com>
This commit is contained in:
parent
f807b5ef83
commit
e5131e98ed
|
@ -763,8 +763,9 @@ func parseNetworkAttachmentOpt(ep opts.NetworkAttachmentOpts) (*networktypes.End
|
|||
if len(ep.Aliases) > 0 {
|
||||
return nil, errors.New("network-scoped aliases are only supported for user-defined networks")
|
||||
}
|
||||
if len(ep.Links) > 0 {
|
||||
return nil, errors.New("links are only supported for user-defined networks")
|
||||
if len(ep.Links) > 0 &&
|
||||
!container.NetworkMode(ep.Target).IsBridge() {
|
||||
return nil, errors.New("links are only supported for user-defined networks and bridge network")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue