Skip to content

Instantly share code, notes, and snippets.

@noateden
Last active July 27, 2018 02:06
Show Gist options
  • Save noateden/c355af18e995fb580b76171e973b123c to your computer and use it in GitHub Desktop.
Save noateden/c355af18e995fb580b76171e973b123c to your computer and use it in GitHub Desktop.
Create a ubuntu x11 docker image, forward GUI to docker host

Create Docker file

mkdir ubuntu-x11
cd ubuntu-x11
cat > Dockerfile

FROM ubuntu:bionic
RUN apt update
RUN apt install -y x11-apps
CMD ["/usr/bin/xeyes"]

Build image

sudo docker build -t xeyes .

Run image

sudo docker run -it --net=host --env="DISPLAY" -v /dotnet:/data --volume="$HOME/.Xauthority:/root/.Xauthority:rw" xeyes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment