You can configure temporary port forwarding as follows:
On your Mac:
$ ifconfig | grep 192 inet 192.168.1.21 netmask 0xffffff00 broadcast 192.168.1.255 inet 192.168.59.3 netmask 0xffffff00 broadcast 192.168.59.255 $ docker run -d -P --name web nginx $ docker port web 443/tcp -> 0.0.0.0:49153 80/tcp -> 0.0.0.0:49154 $ boot2docker ssh -vnNTL 192.168.1.21:8080:localhost:49154
On a PC or any other device on the same 192.168.1 network, you can now access the nginx server using http://192.168.1.21:8080
See also boot2docker workarounds .
source share