How to access Docker container’s web server from host

Extending Anentropic’s answer: boot2docker is the old app for Mac and Windows, docker-machine is the new one.

Firstly, list your machines:

$ docker-machine ls

NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://192.168.99.100:2376

Then select one of the machines (the default one is called default) and:

$ docker-machine ip default

192.168.99.100

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)