I would go with the --format
option of inspect:
docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${CID}
Which will return just the IP address.
Read full article from Getting a docker containers ip address from the host - Stack Overflow
No comments:
Post a Comment