Given a docker machine (started with docker-machine
) and a docker-compose.yml
file with a service (ex: web) that exposes a port (ex: 3000), get the address for a running container, ex:
$ addr web 3000
192.168.99.100:32768
If not running from directory containing docker-compose.yml
, or if you want to use an alternative .yml
file, specify the file pathname with the 3rd parameter, ex:
$ addr web 3000 path/to/common.yml
192.168.99.100:32768