Skip to content

Cannot set hosts in daemon configuration #453

@johnnyhoffman

Description

@johnnyhoffman

Expected behavior

Start docker with the value of "hosts" from the Daemon config

Actual behavior

Failure to start daemon because of conflict with -H flag

Information

  • Diagnostic ID: D6EBFDA6-3FCC-4AD3-BD57-560DCB6D3905/2017-01-31_17-30-49
  • Windows 10 Pro, Version 1607
  • Docker version 1.13.0, build 49bf474

Steps to reproduce the behavior

  1. Go to Settings in GUI
  2. Go to the Daemon tab
  3. Switch from Basic to Advanced
  4. input the following config:
{
  "hosts": [
    "tcp://0.0.0.0:2376",
    "npipe://"
  ]
}
  1. Press Apply

The error is 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:2376 npipe://])

From this stack overflow post, and the GitHub issue reference from it, I can gather that this is because docker is by default running with a -H flag. However, the suggested fix does not seem to apply to Windows. Is there a Windows fix equivalent to setting DOCKER_OPTS to ""?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions