Merge pull request #18451 from WeiZhang555/net-err

Better error message for network connect
This commit is contained in:
Phil Estes 2015-12-07 09:17:48 -05:00
commit 7d6a2e3cf5
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@ func (daemon *Daemon) connectToNetwork(container *container.Container, idOrName
ep, err := container.GetEndpointInNetwork(n)
if err == nil {
return fmt.Errorf("container already connected to network %s", idOrName)
return fmt.Errorf("Conflict. A container with name %q is already connected to network %s.", strings.TrimPrefix(container.Name, "/"), idOrName)
}
if _, ok := err.(libnetwork.ErrNoSuchEndpoint); !ok {