Created
October 18, 2016 08:40
-
-
Save patrick-mota/3360ef0a82e06fea173fda43a0280ab7 to your computer and use it in GitHub Desktop.
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
# As example I take pidgin container. | |
# Mount your x11: | |
docker run -d --device /dev/snd --name pidgin -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY thshaw/pidgin | |
# Store container id | |
export containerId=$(docker ps -l -q) | |
# Stop container | |
docker stop $containerId | |
# Give xhost access to this container only | |
xhost +local:`docker inspect --format='{{ .Config.Hostname }}' $containerId` | |
# Launch container | |
docker start $containerId | |
# Pidgin should appear | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment