Getting Mac address from Docker Container -
is possible mac address of host machine docker container , write in text file?
docker inspect <container name or id> |grep macaddress|tr -d ' ,"'|sort -u
or inside container:
ifconfig -a
ifconfig part of 'net-tools' linux pkg , way enter running container:
nsenter -t $(docker inspect --format '{{ .state.pid }}' <container name or id> ) -m -u -i -n -p -w
Comments
Post a Comment