How to change hosts in Docker for Windows in daemon.json?

0 votes

I'm trying to change daemon.json on Docker for Windows "hosts": [] settings:

{
  "hosts": [
    "tcp://0.0.0.0",
    "http://0.0.0.0"
  ]
}

But I get this error:

Docker daemon failed with message: 
unable to configure the Docker daemon with file C:\ProgramData\docker\config\daemon.json: 
the following directives are specified both as a flag and in the
configuration file: 
hosts: (from flag: [npipe:////./pipe/docker_engine_windows], 
from file: [tcp://0.0.0.0 http://0.0.0.0])
Oct 16, 2018 in Docker by Sophie may
• 9,870 points

retagged Nov 13, 2018 by Kalgi 848 views

1 answer to this question.

0 votes
you cannot specify options both as a flag and in the configuration file (daemon.json).
If you change your DOCKER_OPTS to DOCKER_OPTS="" and restart, then it should work. We explicitly don't "merge" these configurations.
answered Oct 16, 2018 by Tyrion anex
• 8,280 points

Related Questions In Docker

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,920 points
218 views
0 votes
1 answer

How to install telnet in Docker for Windows 10?

If you are trying to telnet in ...READ MORE

answered Aug 27, 2018 in Docker by Tyrion anex
• 8,280 points
629 views
0 votes
1 answer

How to save a Dynamic port in Docker for Windows?

The mapped ports can be accessed via ...READ MORE

answered Sep 4, 2018 in Docker by Tyrion anex
• 8,280 points
48 views