A Docker image based on crux to demonstrate how to "Dockerize" X Applications. This "Dockerizes" X-Chat.
Create these steps as a script or shell function::
export XSOCK=/tmp/.X11-unix export XAUTH=/tmp/.docker.xauth
touch $XAUTH xauth nlist :0 | sed -e "s/^..../ffff/" | xauth -f $XAUTH nmerge -
docker run -i -t -e DISPLAY -e USER -e XAUTHORITY=$XAUTH -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH --net=host crux/xchat
Example Bash function:
dkx() {
export XSOCK=/tmp/.X11-unix
export XAUTH=/tmp/.docker.xauth
if [ ! -f $XAUTH ]; then
touch $XAUTH
xauth nlist :0 | sed -e "s/^..../ffff/" | xauth -f $XAUTH nmerge -
fi
docker run -i -t -e DISPLAY -e USER -e XAUTHORITY=$XAUTH -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH \
--net=host $@
}
Usage:
dkx crux/xchat
Content type
Image
Digest
sha256:48ad78046…
Size
508.8 MB
Last updated
about 7 years ago
docker pull crux/xchat