Does it possible to run GUI base desktop application on Dockers

I’m new to Dockers. Just curious, is it possible to run GUI base desktop application (eg: Open Office) on dockers.
I’m trying to understand, Can I leverage on Dockers for CI/CD of my GUI base Desktop application.

I’d consider it an advanced topic; I’ve seen people discussing doing it, but getting things like the X11 DISPLAY environment variable set correctly are challenging. Docker also won’t intrinsically solve the problem for you that GUI applications want to display somewhere.

So in theory you could set up an Xvfb container, and run Open Office or Mozilla or other applications in separate containers rendering to that Xvfb, but it’s not a “normal” pattern, and you’d have to know a lot about how X works “under the hood” to make it actually go. It definitely would not be the first thing I tried in Docker.

You can run GUI apps in Docker if you are running Docker on a local Linux machine:

docker run --net=host -e DISPLAY ...

This doesn’t work on a remote machine, even if you can run GUI apps on the remote machine without Docker. I would really like to do that. Does anyone know how?

I use xrdp, though I still have work todo refining fixing things - copy and paste doesn’t work (for eg)

https://hub.docker.com/r/deskor/xrdp/ ( https://github.com/deskor/xrdp ) as my base image.

see https://github.com/deskor/chrome/blob/master/Dockerfile and https://github.com/deskor/vscode/blob/master/Dockerfile (and their respective image on hub) as examples of using that base image.

then you run the containers mapping the container’s port 3389 to anything you like, and connecting to it using an rdp client.

So far, I’m not using any security - its used internally to my network to give me portable apps.

Hi ,
You can refer to one of projects which can run GUI application on Docker.

There is a project on github to run GUI applications in docker: x11docker

Short setups without x11docker can be found here: Short setups to provide X display to container · mviereck/x11docker Wiki · GitHub

You can run x11docker with ssh, e.g. ssh -X user@server x11docker imagename

Hi there :slight_smile:
I’ve managed to run whole Linux desktop on docker
Works fine (needs to tweak sys init & gpu acceleration)

https://github.com/virtimus/i3c/tree/master/dockerfiles/mint

rootfs for the image extracted from linux mint install iso
some description here: