1248 shaares
If you expect that IP address might change you could go the extra mile and do something like
docker container run -e "DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')"
..., this way every time you run your container, it’ll have the IP address available inside the container set to the DOCKER_HOST environment variable.