I am in a corporate dhcp network and the ip changes frequently. While running one of the docker containers in my laptop, i have to pass the local ip of my machine for allowing a call back to a different application.
I am now running the container with -e MYHOST=x.x.x.x. But when IP changes, i have to lookup the ip manually and edit this property and restart my container.
I use Kitematic for launching. Is there a way it can be configured to automatically pickup the hostIP. Something like -e MYHOST=${hostIP}
In this case I think you have to use the
--network=host
option todocker-run
.