Skip to main content

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”:

 

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

In my example, the interface we’re looking for is “vboxnet2“.

Lookup the ip by executing “ifconfig vboxnet2” in the terminal.

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

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