Quick tech tip, mostly for me to remember.

 

When running docker containers on OSX it can act a little weird.

 

Because Docker is running as a VM, when you do a port binding via :

 

docker run - p localhostport:containerport

The container port is actually bound to the IP bound to docker VM, and not necessarily to localhost.

Be sure to run a docker-machine ip default to verify what the address is for the VM.

so if docker-machine ip default

returns

192.168.100.100

then accessing the localport for a mapped container port would be 192.168.100.100:localhostport

 

Hopefully this saves some one else from pulling their hair out.