Last active
October 17, 2015 06:46
-
-
Save danidiaz/04c5999edad814e0aa59 to your computer and use it in GitHub Desktop.
Docker & X11 shenanigans
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run centos yum install -y xorg-x11-xauth xeyes | |
docker ps -l | |
docker commit zzzzzzzzzz centos:xeyes | |
docker run -v $HOME:/hosthome:ro -e XAUTHORITY=/hosthome/.Xauthority -e DISPLAY=$DISPLAY centos cat /hosthome/.Xauthority | |
docker run -v $HOME:/hosthome:ro -e XAUTHORITY=/hosthome/.Xauthority -e DISPLAY=$(echo $DISPLAY | sed "s/^.*:/$(hostname -i):/") centos:xeyes xeyes | |
alias dockerX11run='docker run -v $HOME:/hosthome:ro -e XAUTHORITY=/hosthome/.Xauthority -e DISPLAY=$(echo $DISPLAY | sed "s/^.*:/$(hostname -i):/")' | |
dockerX11run centos:xeyes xeyes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment