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 on
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 πŸ‡¦πŸ‡ΉπŸ‘¨πŸ»β€πŸ’» Author

Thanks for the feedback!