mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Delete the redundant function 'errClusterNetworkOnRun'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn> Upstream-commit: 9c3d1236d22504410bf7363acbad382917e3a630 Component: engine
This commit is contained in:
@@ -330,10 +330,6 @@ func (daemon *Daemon) updateNetwork(container *container.Container) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func errClusterNetworkOnRun(n string) error {
|
||||
return fmt.Errorf("swarm-scoped network (%s) is not compatible with `docker create` or `docker run`. This network can only be used by a docker service", n)
|
||||
}
|
||||
|
||||
func (daemon *Daemon) findAndAttachNetwork(container *container.Container, idOrName string, epConfig *networktypes.EndpointSettings) (libnetwork.Network, *networktypes.NetworkingConfig, error) {
|
||||
n, err := daemon.FindNetwork(idOrName)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user