How did you get this working ?
When Xquartz runs it opens a socket, it is not listening on a port.
Are you running socat to do port forwarding from port 6000 to socket ?
e.g.
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:"$DISPLAY" &
Indeed the socket is somehow pre-opened on OS X even if xQuartz is not running, I believe this is done that way so that as soon as an application try to use X11, Quartz is started.
I have Quartz up and running and lost -i :6000 shows no one is listening on port 6000.
of course if I start socat as in my example then lost find that scout is listening.
However I expect docker for mac to works like dock on linux in that aspect of X11 forwarding.
I mean
docker run -it -v /private/tmp/com.apple.launchd.hF6VPfurBa/org.macosforge.xquartz:0:/tmp/.X11-unix/X0 ubuntu
or even better
docker run -it -v ${DISPLAY}:/tmp/.X11-unix/X0 ubuntu
as DISPLAY is set.
should allow the docker container to access the display as it is done with ubuntu with such command
docker run -it -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 ubuntu
however
docker run -it -v ${DISPLAY}:/tmp/.X11-unix/X0 ubuntu on OS X gives this error
invalid mode: /tmp/.X11-unix/X0.
I suspect the : in the DISPLAY variable to disturb the docker daemon parsing.
I tried to escape it with a \ or to put all between got with no success and the same error