Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set hosts in daemon.json because of arguments to dockerd in Ubuntu/Debian #42

Closed
haxorof opened this issue Jun 23, 2018 · 1 comment
Labels

Comments

@haxorof
Copy link
Owner

haxorof commented Jun 23, 2018

It is not possible to only use docker_daemon_config to configure Docker daemon to for example also expose the TCP socket, see example below:

---
- hosts: localhost
  roles:
    - role: haxorof.docker-ce
      docker_daemon_config:
        hosts:
          - "tcp://0.0.0.0:2376"
          - "fd://"
        tlsverify: true
        tlscacert: "/etc/docker/ssl/ca.pem"
        tlscert: "/etc/docker/ssl/cert.pem"
        tlskey: "/etc/docker/ssl/key.pem"

You will see this error in the journal logs:

Jun 23 19:46:42 labrat dockerd[32221]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [fd://], from file: [tcp://0.0.0.0:2376 fd://])
@haxorof haxorof changed the title Cannot set hosts in daemon.json because of arguments to dockerd Cannot set hosts in daemon.json because of arguments to dockerd in Ubuntu/Debian Jun 24, 2018
@haxorof
Copy link
Owner Author

haxorof commented Jun 24, 2018

moby/moby#25471

@haxorof haxorof added the fix label Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant