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

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -