docker - Linux command output as input at particular location of another command.? -


i using docker command on linux operating system

docker ps | awk '{print $nf;}' | docker inspect --format '{{ .networksettings.ipaddress }}' 

in command need container name @ last, show internal ip address.

is possible put container name @ last of command.?

a quick fix

docker ps -a |awk 'nr>1{print $nf}'|xargs docker inspect --format '{{ .networksettings.ipaddress }}' 

another way

docker inspect --format '{{ .networksettings.ipaddress }}' $(docker ps -a -q) 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -