Skip to content

Instantly share code, notes, and snippets.

@mRoca
Last active September 25, 2015 08:41
Show Gist options
  • Save mRoca/4a32926a632441087fd9 to your computer and use it in GitHub Desktop.
Save mRoca/4a32926a632441087fd9 to your computer and use it in GitHub Desktop.
Docker display share
# Share the current user with the container
docker run \
--rm \
-e DISPLAY \
-e UNAME=$USER \
-v $(mktemp -d):$HOME \
-v $(mktemp -d):/data \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /etc/group:/etc/group:ro \
-v /etc/passwd:/etc/passwd:ro \
marcelhuberfoo/sqldeveloper
# Simple way, with a `docky` user in the container
xhost +local:docky
docker run --rm -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix marcelhuberfoo/sqldeveloper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment