Closed qmwugbt112 closed 9 years ago
Haven't tested / worked on display functionality from docker containers yet.
FYI I've installed X11 and got it working from R running on OS X, but in this case miracles don't happen - it does not work from R in biolinux.
I would have been surprised if opening a window on host "just worked" from docker container.
Something like this could work: docker run -it -v $DISPLAY:$DISPLAY -e DISPLAY=$DISPLAY <image>
Needs to show elegant error message if X is impossible (because X11 not installed or doesn't accept export - with link to proper instructions)
Relevant (GUIs section): https://blog.jessfraz.com/posts/docker-containers-on-the-desktop.html
This is a "generic" issue for docker - thus I feel (hope) that docker will improve to overcome this. So we should not be investing energy redundantly.
Furthermore, there are additional challenges (e.g. will it work on your local X if you're using docker on a machine on the cluster?).
Finally, things like R can output to pdf rather than to X. pdf("output.pdf"); plot(1:10, 1:10); dev.off()
- many of us already prefer this way of using R....
Thus I'm closing this issue for now.
Just for future reference, one possible solution would be ssh with X forward. Here's an example of Dockerfile with X forward working: https://github.com/bmpvieira/Dockerfiles/tree/master/seqgrapher
I tried running R from biolinux. Neither X11() nor quartz() would open a plotting window. Is there any way round this? I'm currently trying to install X11 on the Mac