Prerequisites
First install socat via brew:
1 |
brew install socat |
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:
1 |
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" |
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 🙂
1 |
docker run --rm -it -e DISPLAY=192.168.99.1:0 ianblenke/xfce firefox |
This will download a minimal image (~200MB) and start Firefox