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
Post a Comment