Mac: how to remotely access server running inside docker container from other computers?

admin

Administrator
Staff member
First I installed boot2docker on OSX 10.10, then I successfully ran a web container. With <a href="https://fogstack.wordpress.com/2014/02/09/docker-on-osx-port-forwarding/" rel="nofollow noreferrer">port redirection configuration</a>, I can browse the web server by
Code:
localhost:8080
in the browser. Now I want to access the server from other computers, in the same WLAN, by using of url
Code:
my-mac-ip:8080
. I googled over and tried many ways, still not figured out the solution.

I found <a href="https://stackoverflow.com/questions/21970337/remote-access-to-webserver-in-docker-container">similar question</a>, but iptables doesn't work for OSX.

I'm new to Docker and I'm not familiar with network configuration, please help me out! Thanks!