NAMEWITHELD12
asked on
How can I grep a Dockerfile in windows for the container IP ?
I want to use the command "docker inspect <container name> and just return the IP address .
the Linux command to to this is "docker inspect <container name | grep IPAddress "
what is the windows way to do this ?
thanks !!
the Linux command to to this is "docker inspect <container name | grep IPAddress "
what is the windows way to do this ?
thanks !!
ASKER
thanks can you use FindStr in an example ?
thanks!!!!!!!!
thanks!!!!!!!!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect man !!! thanks !!!!
PS C:\Users\Administrator> docker inspect ff8 | FindStr IPAddress
"SecondaryIPAddresses": null,
"IPAddress": "",
"IPAddress": "172.17.254.209"
PS C:\Users\Administrator> docker inspect ff8 | FindStr IPAddress
"SecondaryIPAddresses": null,
"IPAddress": "",
"IPAddress": "172.17.254.209"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Need comment from NAMEWITHELD12 and Administrator to close this query.
Need comment from NAMEWITHELD12 and Administrator to close this query.
Comment if any objection.
PowerShell gets Select-String which is a bit more powershell.
Either can be used as a simple (not anywhere near as complex) substitute for grep.
It's difficult to advise further, I don't have docker so I couldn't tell you if there's a better way.