Docker connecting to localhost services

Since Docker on Mac runs under a docker-machine, is it possible to connect to services on the localhost such as a DB on 8000? I know how to connect from docker to docker, but is docker to localhost (my Mac, not docker-machine) an option?

See Access host (not vm) from inside container for the hoop you have to jump through.

Thanks, but reading that it looks like a sketch workaround by inserting your machine IP address, which will change occasionally in my case. So nothing docker native that allows this?

On every Docker installation I’ve used (native Linux Docker, Mac VirtualBox Docker, Mac Docker beta) you’ve had to know the host system’s IP address for this sort of thing.

Ok, thanks. I’m trying to write the container in a way that can run on both my machine and other Mac user’s machines, using the same container and then their local db.