OSX: Use a GUI (X11) app in Docker

Prerequisites

First install socat via brew:

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

Next is XQuartz. Download the DMG from http://www.xquartz.org/ and install it.

 

Preparations

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

Firefox

Read More