Closed ovanes closed 4 years ago
I am investigating the issue. It looks like there are at least two defects. In the mean time, you can edit the daemon.json
manually like so:
$ cd ~/Library/Containers/com.docker.docker/Data/database
$ git reset --hard
$ $EDITOR com.docker.driver.amd64-linux/etc/docker/daemon.json
$ git add com.docker.driver.amd64-linux/etc/docker/daemon.json
$ git commit -m "worked around daemon.json brokenness"
It looks like adding hosts
to daemon.json
will always fail as Docker for Mac passes hosts as a daemon command line flag as well:
Jan 18 17:14:16 moby root: 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: [unix:///var/run/docker.sock], from file: [tcp://0.0.0.0:2375 unix:///var/run/docker.sock])
Thanks for your report! I've now filed 3 separate bugs (for lock-out, unnecessary escaping, and allowing hosts
field). We'll report back here on progress.
Thanks for reacting so fast, as it is a major breaking point for me right now, to debug our distributed application. I need to connect to docker instances with remote debuggers.
I recommend using a tool like socat
to connect over TCP:
$ socat TCP-LISTEN:2376,reuseaddr,fork,bind=127.0.0.1 UNIX-CLIENT:/var/run/docker.sock
In this case, I've restricted the socket to only listen on the loopback interface but you may want it to be more widely available (or restrict the network with range=CIDR
or similar).
I couldn't find /etc/docker/daemon.json not even the folder /etc/docker/ on my mac.
Should this file be created manually under the location (the comment above does not suggest that though)
@rawjeev Did you attach to docker TTY as I described in my post? Or do you just try to find /etc/docker
on you Mac OS?
In the section Steps to reproduce the behavior first step I describe is:
Attaching to Docker TTY via screen
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
@dsheets It seems that the "unnecessary escaping" may be resolved, correct? At least I didn't encounter it when adding hosts to my daemon.conf from the GUI. Unfortunately, I did encounter the other two on version 17.03.1-ce-mac5 (16048), so I wondered whether I could kindly request a status update for at least those two issues? Thanks a bunch in advance!
The escaping and the lock-out should be fixed. The hosts
failure remains.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
@dsheets did the hosts failure get fixed?
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked
Expected behavior
dockerd
starts properlyActual behavior
Once "Advanced" config was applied and
dockerd
can't start it is disabled and one can't do anything about it in the UI, but investigate where is the actual data is stored and how to fix OR to reset docker to factory setting, which ... (put whatever curse word here)!dockerd
is not started due to escapeddaemon.json
:Information
Why are slashes escaped in
/etc/docker/daemon.json
:Removing them from JSON, makes
dockerd
start again.Steps to reproduce the behavior
Attaching to Docker TTY via screen
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
and tracing
dockerd
startup produces:Removing
\
from/etc/docker/daemon.json
escape slashes, makedockerd
start again:Please either fix it asap, or at least reply, where to edit them persistently...