mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
Fix bug in initializeNetwork()
- On `docker run --net <network id> ...` the bug would cause the container to attempt to connect to the network two times - Also made sure endpoint creation rollback will be executed on failures in `func (container *Container) connectToNetwork()` Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
@ -733,3 +733,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkMultipleNetworksUngracefulDaemonRe
|
||||
|
||||
verifyContainerIsConnectedToNetworks(c, s.d, cName, nwList)
|
||||
}
|
||||
|
||||
func (s *DockerNetworkSuite) TestDockerNetworkRunNetByID(c *check.C) {
|
||||
out, _ := dockerCmd(c, "network", "create", "one")
|
||||
dockerCmd(c, "run", "-d", "--net", strings.TrimSpace(out), "busybox", "top")
|
||||
}
|
||||
|
Reference in New Issue
Block a user