

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.
GET DOCKER IP HOW TO
Here's how to do it on Docker for Mac, Windows and Linux. I have tried installing docker-machine, but that is no use now.

Docker for Mac 2.5.0.1, engine 19.03.13 (I can not upgrade for now). If that’s the case you would just use as your DB connection host. 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. But even then, there doesn't seem to be a way to get docker host IP from command line anymore (without launching docker-compose first). I often see this use case come up when people are beginning to move their stack over into using Docker.

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. A tool to get docker host ip or docker-container ip address. 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. 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.
