You do not really export anything in particular, you rather make them accessable as a whole from all containers ( all ports of the OSX-host-localhost) If you experience performance issues with code shares on OSX with docker containers, check - it is compatible with docker-for-mac ( hint: i am biased on this one )Įxport ports from the OSX-host to a containter.when you now do docker run -p 3306:3306 percona it will bind 3306 on the osx-host-localhost, thus every other osx-tool trying to attach to localhost:3306 will work ( very useful ) just as you have been used to it when you installed mysql using brew install mysql or likewise.Its based on a special xhyve stack which reuses your hosts network stack First, use/install docker-for-mac instead of dockertoolbox or others.To solve those issues elegantly Expose ports to OSX localhost from the container The exposed ports of the container are not exposed to OSX host localhost, but rather OSX Docker-VM-ip. This VM has, of course, its own network stack and own IP on the host, and thats were your tools will have issues with. Your issue is most probably that you are using dockertoolbox or dhingy/dlite or anything else providing a full-fledged linux VM, which then hosts docker to run your container inside this VM.