mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

Absolute minimum requirement on host #444

Closed liyimeng closed 2 years ago

liyimeng commented 2 years ago

I am a little confused. I see there is x11docker/xserver docker images. What dose it provide? If we have this image, what is the bare minimum requirement on host? Base is needed of cause. X still needed? GPU drivers still needed? If I want a most clean host env, what is the absolute minimum requirements?

mviereck commented 2 years ago

If I want a most clean host env, what is the absolute minimum requirements?

It depends on what you want to do. To run a GUI in a docker container appearing on your monitor: As a core you need bash, docker (or podman) and Xorg (+xinit). Additionally recommended tools are xauth xclip xhost xrandr xdpyinfo.

GPU drivers still needed?

Yes, Xorg needs them to access the monitor.

I see there is x11docker/xserver docker images. What dose it provide?

x11docker/xserver provides nested X servers that can run in an already running X session, e.g. a desktop environment. The supported x11docker X server options are documented here: https://github.com/mviereck/dockerfile-x11docker-xserver

liyimeng commented 2 years ago

Thanks a lot! @mviereck

mviereck commented 2 years ago

Since today x11docker supports to run Xorg in a container of x11docker/xserver. Use options --xorg --xc. You would need to update x11docker to latest beta (x11docker version: 7.1.5-beta-17), and also update the image x11docker/xserver. This reduces dependencies on host, x11docker should work with just bash+docker+x11docker/xserver. I am not sure if the GPU drivers are still needed on host. Likely yes to provide the kernel modules. Running Xorg in container is still experimental; it might fail in different setups than mine and needs to be tested.