Skip to content

Instantly share code, notes, and snippets.

@patrick-mota
Created October 18, 2016 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrick-mota/3360ef0a82e06fea173fda43a0280ab7 to your computer and use it in GitHub Desktop.
Save patrick-mota/3360ef0a82e06fea173fda43a0280ab7 to your computer and use it in GitHub Desktop.
# 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