/docker-x11-macos

Run X11 apps in Docker in macOS

Primary LanguageDockerfileApache License 2.0Apache-2.0

docker-x11-macos

Run X11 apps in Docker in macOS

Based on this tutorial

Requirement

Steps

1.- Get Ip address

export IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')

2.- Open XQuartz

3.- Execute docker

xhost +$IP
$ docker run --rm  --name firefox -e DISPLAY=$IP:0 -e XAUTHORITY=/.Xauthority --net host -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.Xauthority:/.Xauthority  jess/firefox

4.- Running the below command we get Firefox for Ubuntu displaying on a Mac OS X desktop.

xhost +local:docker