Created
March 12, 2018 21:09
-
-
Save bahorn/27b0e9455f363ead05e41f6819d7ea2e to your computer and use it in GitHub Desktop.
Docker GUI.
This file contains 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
#!/bin/bash | |
IMAGE=<IMAGE_HERE> | |
CONTAINERNAME=<NAME_HERE> | |
XSOCK=/tmp/.X11-unix | |
XAUTH=/tmp/.docker.xauth | |
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - | |
docker run -dt \ | |
--name $CONTAINERNAME \ | |
-p 4444:4444 \ | |
-v $XSOCK:$XSOCK \ | |
-v $XAUTH:$XAUTH \ | |
-e XAUTHORITY=$XAUTH \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-e DISPLAY=$DISPLAY \ | |
--device /dev/snd \ | |
--memory 512mb \ | |
$IMAGE tail -f /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment