DEV Community

Discussion on: Docker Tip - How to use the host's IP Address inside a Docker container on macOS, Windows, and Linux

Collapse
 
horaciodegiorgi profile image
Horacio Degiorgi • Edited
export DOCKER_GATEWAY_HOST="`hostname -I` |awk '{print $1}'  `" 
Enter fullscreen mode Exit fullscreen mode

to automatize the iP (only get the first)

Collapse
 
natterstefan profile image
Stefan Natter πŸ‡¦πŸ‡ΉπŸ‘¨πŸ»β€πŸ’»

Thanks for the feedback!