This could come in handy if you wanted to connect to a database that’s running on your host but isn’t running inside of a container. Docker for Mac / Docker for WindowsĪs of Docker v18.03+ you can use the hostname to connect to your Docker host. In Docker Tip #35 I wrote about connecting to your Docker host from inside of a container but a lot of things have changed since then. Here's how to do it on Docker for Mac, Windows and Linux.
Updated on July 27th, 2018 in #docker Docker Tip #65: Get Your Docker Host's IP Address from in a Container Once in a while you may need your Docker host's IP address.