DEV Community

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

Collapse
thiagorb profile image
Thiago Romão Barcala

Another alternative is to add the entry below to your Linux host's /etc/hosts:

172.17.0.1 host.docker.internal
Enter fullscreen mode Exit fullscreen mode

Then you can simple define the environments as:

  DB_UPSTREAM: http://host.docker.internal:3000
Enter fullscreen mode Exit fullscreen mode