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
• 10,620 points

retagged Nov 13, 2018 by Kalgi 4,639 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,700 points

Related Questions In Docker

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+2 votes
1 answer
+2 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
• 58,020 points
2,714 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 28, 2018 in Docker by Tyrion anex
• 8,700 points
3,467 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,700 points
857 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP