This directory contains binaries for a base distribution and packages to run on Mac OS X (release 10.6 and above). Mac OS 8.6 to 9.2 (and Mac OS X 10.1) are no longer supported but you can find the last supported release of R for these systems (which is R 1.7.1) here.Releases for old Mac OS X systems (through Mac OS X 10.5) and PowerPC Macs can be found in the old directory.
This is a short guide explaining how to run GUI applications from within Docker on Mac. This uses XQuartz to enable to set the
DISPLAY
variable within the container.- The XQuartz project was originally based on the version of X11 included in Mac OS X v10.5. There have been multiple releases of XQuartz with fixes, support for new OS X features, and additional refinements to the X11 experience.
- Find XQuartz software downloads at CNET Download.com, the most comprehensive source for safe, trusted, and spyware-free downloads on the Web.
- The XQuartz project is an open-source effort to develop a version of the X.org X Window System that runs on Mac OS X. Together with supporting libraries and applications, it forms the X11.app that Apple has shipped with OS X since version 10.5.
- I only use XQuartz over an SSH connection: ssh -Y user@hostname You will need a /.Xauthority file on your client machine (not the Mac). It should be generated automatically, but check for it.
Install XQuartz
Xquartz For Mac Inkscape
You can install XQuartz using homebrew with
brew cask install xquartz
or directly from the website here. At the time of writing, I had 2.7.11
installed on my machine with OSX El Capitan. After installing XQuartz restart your machine.Install Docker for Mac
How To Use Xquartz Mac
Install docker using
brew cask install docker
or directly from the website here.Run XQuartz
Start XQuartz from command line using
open -a XQuartz
. In the XQuartz preferences, go to the “Security” tab and make sure you’ve got “Allow connections from network clients” ticked:![For For](/uploads/1/2/9/4/129423978/523015734.png)
![2.7.7 2.7.7](/uploads/1/2/9/4/129423978/262833533.jpg)
Host Machine IP
IP=$(ifconfig en0 | grep inet | awk '$1'inet' {print $2}')
should set the IP
variable as the ip of your local machine. If you’re on wifi you may want to use en1
instead of en0
, check the value of the variable using echo $IP
.Now add the IP using Xhost with
xhost + $IP
. If the xhost command is not found check /usr/X11/bin/xhost
as that might not be in your path.Running a container
You can now try running firefox in your container with:
or run octave using: