Docker Community Forums

Share and learn in the Docker community.

How to run a GUI application on docker

(Dockerforguoc) #1

The OS is windows server 2016 about my computer, and how to run a GUI application on docker?
I found some infomation about Linux but no windows server 2016
Can anyone give some help? Thanks advance

(Artisticcheese) #2

You mean GUI inside container itself? it’s impossible since there is no RDP allowed into container.

(Goffinf) #3

Nonsense, why is RDP relevant. It’s perfectly possible to run a gui application inside a container.

(Artisticcheese) #4

How are you going to run GUI application from command line? What is the point?

(Goffinf) #5

I not commenting on whether what the OP wants to do has a point or not (I think it’s reasonable to assume that they have a relevant use case or why would they take the trouble of posting a question), what I am questioning is your assertion that this isn’t possible and the reason you have why you think that is so.

Care to explain why you are so sure its impossible ?

(Artisticcheese) #6

I guess it might be possible to run GUI based application in console, just no way to actually see the UI and there is no clean way to interact to this UI or automate it. For example if you launch notepad.exe from command line, what comes next after that?
I’m making assumption here but original poster did not work with containers before and confusing containers with real OS and wondering how he can do the same things which he used to do in real VM just this time inside container. Some of those relying on UI based installations or administration tasks. I got this asked frequently from people new to containers. And those tasks are in fact IMPOSSIBLE to do in windows containers. You can not launch UI based installation applications which require input for example in UI.

(Dockerforguoc) #7

yes,you are right, thank you for the reply.
We can run any application in Docker as long as it can be installed and executed unattended, although we can not see the GUI

(Rmaster) #8

So as per above discussion we can’t installed any application which need gui during installation time right ?

(Artisticcheese) #9

Yes, you can not install anything which requires any input inside UI. Majority of installation packages provides no UI option (like MSI installs etc)

(Beggsj) #10

It’s not entirely impossible. There’s no reason you can’t install e.g. tiger vncserver in your container, and then use vncviewer for the display.

(Smccarthy) #11

Just posting because I am interested in this. A huge use-case is for automated UI testing using Selenium. We use docker containers to test firefox and chrome (on linux), but we would like to test Edge or IE as well.

(Artisticcheese) #12

How do you run UI based tests inside docker on Linux?

(Smccarthy) #13

It uses xvfb . Here are the official containers, , but there are many more from other people.

(Artisticcheese) #14

WindwosServerCore image does not come with binaries for UI applications so I doubt this will ever work in servercore image but Microsoft insiders can use new bigger WindwosServer image which I beleive have those libraries intact, while access via UI still missing (RDP is not working) I would guess it might be possible to use automated tools now.

(Smccarthy) #15

From here , I see windowsservercore and also nanoserver. I assume windows server core is the old one? but nanoserver I think comes with even less ? Is there a “WindowsServer” image I am missing?

(Artisticcheese) #16

It’s not in docker hub yet. Details are here

(Smccarthy) #17

Thank you ! I hope to experiment with it this weekend !

(X11docker) #18

It is possible to run GUI applications in Linux containers on Windows host.
Have a look at:

x11docker can run in MSYS2, Cygwin/X or WSL on Windows.
Windows support is in master branch only and will be part of upcoming x11docker release 5.0.0.
It needs X server VcXsrv or Xwin in Cygwin/X.

(Srijasingu) #19

How can u run GUI applications in docker window containers?