Find out which network interface belongs to docker container
问题 Docker creates these virtual ethernet interfaces veth[UNIQUE ID] listed in ifconfig . How can I find out which interface belongs to a specific docker container? I want to listen to the tcp traffic. 回答1: To locate interface In my case getting value from container was like (check eth0 to): $ docker exec -it my-container cat /sys/class/net/eth1/iflink 123 And then: $ ip ad | grep 123 123: vethd3234u4@if122: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker_gwbridge state UP