Skip to main content

OSX: Use a GUI (X11) app in Docker


First install socat via brew:

If you don’t have brew installed, just follow these instructions.

Next is XQuartz. Download the DMG from and install it.



Start socat:

Now start XQuartz. Go to Preferences and enable “Allow connections from network clients”:


XQuarts Setting Menu

Quartz Settings

Now find the ip address of our VM. Open virtualbox and go to the settings of your VM. Click to the “Network” Tab.

Screenshot 2016-02-18 21.56.24In my example, the interface we’re looking for is “vboxnet2“.

Lookup the ip by executing “ifconfig vboxnet2” in the terminal.
Screenshot 2016-02-18 21.57.48

Now we’re ready to start Firefox inside of a docker container 🙂

This will download a minimal image (~200MB) and start Firefox