Skip to content

Instantly share code, notes, and snippets.

@KokoseiJ
Last active April 26, 2022 05:37
Show Gist options
  • Save KokoseiJ/1dc749e4381a05dff2475bdf84acca9d to your computer and use it in GitHub Desktop.
Save KokoseiJ/1dc749e4381a05dff2475bdf84acca9d to your computer and use it in GitHub Desktop.
openbox docker with VNC
FROM ubuntu:latest
ENV DISPLAY=:99
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y openbox xvfb x11vnc
CMD rm -rf /tmp/.X99-lock && \
Xvfb $DISPLAY -screen 0 1280x1024x24 & \
openbox & \
x11vnc -rfbport 5901 -passwd kokosokoasoko -shared -forever
@KokoseiJ
Copy link
Author

sudo docker build -t x11-docker x11_docker
sudo docker run -it -d --name x11 --cap-add NET_ADMIN -p 5901:5901 x11-docker

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