Skip to content

Fetch veth names of network interfaces of docker containers

License

Notifications You must be signed in to change notification settings

dicho-usp/dockerveth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

dockerveth

Fetch veth names of network interfaces of docker containers via the following steps:

  • fetch process id: docker ps NAME --format "{{.State.Pid}}"
  • read network interface: /proc/$PID/net/igmp
  • read veth name: ip -br addr
  • output DOCKER_NAME INTERFACE_NAME VETH_INTERFACE_NAME

run

$ ./veth.sh app_1

will produce updates like this

app_1 eth0    veth7870b4c
app_1 eth1    veth04b7bbc

About

Fetch veth names of network interfaces of docker containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages