(firefox:1): Gtk-WARNING **: Locale not supported by C library.
Using the fallback ‘C’ locale.
Actual behavior
Runs but does not forward display for firefox
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
77ec618eebc7 jess/firefox “/usr/bin/firefox” 52 seconds ago Up 50 seconds firefox
Information
the output of:
pinata diagnose -u on OSX
MacBook-Air:~ bgrissin$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta10
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160506-100054.tar.gz
Most specific failure is: No error was detected
Your unique id is: BC837A9A-C184-44E1-B9FF-86C941DB7E5A
Darwin MacBook-Air.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
I think bridge100 is still supposed to exist and it is a bug if it doesn’t. Is that not true? Why do you think en0 will work? bridge100 last showed up for me in beta 8 as well.
$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.1-beta10
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160507-100945.tar.gz
Most specific failure is: No error was detected
Your unique id is: 910FA6B2-06DD-43F4-B7DA-3E6AF4A619FE
Please quote this in all correspondence.
Apparently bridge100 doesn’t exist anymore and you the ports will be directly exposed on localhost. For X11, perhaps just export DISPLAY=:0 and expose port 6000 with -p 6000:6000.
Run XQuartz
a. Update preferences ‘Security’ tab - turn on 'Allow connection from network clients’
b. Restart XQuartz and then check to see that it is listening on port 6000: lsof -i :6000
Get your local machine’s IP: ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') && echo "My IP is: $ip"
Allow the local machine to talk to XQuartz xhost + ${ip}
Run your docker host: docker run -d --name firefox -e DISPLAY=${ip}:0 -v /tmp/.X11-unix:/tmp/.X11-unix jess/firefox
So, once the steps #1-3 are run then #4 is good to go for any container.
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