I don’t see how effectively quoting back my example helps…
Let me try again
I want to change the default IP of Docker -p/--publish to be something other than 0.0.0.0
The closest (I think) I can find is this comment:
Or if you always want Docker port forwards to bind to one specific IP address, you can edit your system-wide Docker server settings and add the option --ip=IP_ADDRESS
in the docs - but where is Docker server in Docker for Mac?
I apologize that this is exactly the opposite of what you’re asking for, but could you describe what you did, if anything, to make your containers publicly accessible? I do want mine to be accessible by my colleagues on my work network, and yet they aren’t, despite supposedly being bound to 0.0.0.0.
My docker ps output is:
5d95d5d760bf multitenant "/entrypoint.sh bi..." 13 seconds ago Up 11 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp multitenant
I’ve confirmed that this is not a firewall issue on my machine, as it is configured to allow traffic from work IPs on port 80/443. I even tried disabling it completely, but that didn’t help.
I’m not sure if it’s relevant, but I’m using docker-compose to bring up my machines. It’s configured to expose the appropriate ports, as you can see from docker ps, but they are still inaccessible by my colleagues. They cannot browse to the web server running in that container, and cannot telnet into either port.
Sorry, I don’t know the answer. Your output look like what I had, so I’d
guess it’s something to do with your corporate network. I’d open another
question to not confuse this one or your question.
To test - I’d download a container that you know works, i.e. I always use
[1], and then try it. I’d also try connecting from your phone when you are
on another (less restrictive) network, say your home network. If you can,
then it’s a useful piece of evidence. If you can’t…then there’s some
other blocking - like firewall. Are there any iptables issues/changes that
you know about.
BTW the MacOS firewall doesn’t seem to do what it claims on the box, so
don’t be surprised if it’s doing something unexpected.