Created
June 3, 2016 23:25
-
-
Save narqo/3109465f3003374c92776c64cf141f76 to your computer and use it in GitHub Desktop.
how docker's libnetwork works
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker start ... | |
docker/daemon/container_linux.go | |
container.Start() | |
container.initializeNetworking() | |
container.AllocateNetwork() | |
n := container.daemon.netController.NetworkByName() | |
ep := n.CreateEndpoint() | |
d := n.driver | |
d.CreateEndpoint() | |
ep.AddInterface() | |
ep.iFaces := append(.., iface) | |
ep.Join() | |
sb := ctrlr.sandboxAdd() | |
for _, iface := range ep.iFaces | |
sb.AddInterface(iface) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment