I just had the same issue. It looks like there is automatic mapping happening in docker for mac. So if you do a -v 3000:3000 for instance then automatically this port gets mapped to Mac port 3000, but the behavior seems unreliable. I’ve been trying to use node-inspector on port 8080 and it has worked once but then fails.
I thought I had this problem: the docs don’t say exactly clearly what will happen when switching from docker-machine/vbox (of Docker Toolbox) to D. for Mac and basically no network access was working, automatic or -p explicit, container IP (found only via network inspect or host IP.
I eventually realized that run parameters must come before, not after, the image name. doh Then forwarding turned out to be working just fine.
Not sure but that might be something that has changed in recent versions.
So you should be able to access containers from your container host using the container IP . You can use docker inspect <container ID> to get your container’s IP address.