Skip to content

How -p 8080:80 reaches your container

Select an icon to see what it is.

Step 2 of 6

dockerd wires the container to the network

On start, dockerd asks the kernel for a veth pair. One end joins the shop-net bridge on the host. The other end moves into the container's network namespace, is named eth0 and gets 172.18.0.2.

Netlink: new veth pair

host end: veth<id> -> master br-<shop-net id>
container end: eth0 172.18.0.2/16, gateway 172.18.0.1