Can I change the default IP from 0.0.0.0 when binding?

So it’s not as clearly documented as it could be, but it is a simple fix:

Visit Docker > Preferences > Daemon > Advanced in the toolbar and add the line

  "ip" : "127.0.0.1",

to the start of the configuration file, i.e. it will look like

{
  "ip" : "127.0.0.1",
  "experimental" : false
}

Restart and then the default (i.e. when you don’t define it) host for published ports will be 127.0.0.1.

3 Likes