7

I need to use Docker Windows containers for Windows applications to run on it. I build an image with Windows 2019 Server and installed x server for the display like the ubuntu image but it doesn't work .

so Is there a way to access a Windows Container via GUI?

is there a windows image that supports GUI applications ? Is there a solution to run application GUI applications in windows containers ?

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community May 10 '22 at 15:26

1 Answers1

4

The short answer here is no. Windows containers don't have the underlying GUI components available, so you can't run any desktop application on Windows containers.

The longer answer is that this depends on what you're trying to achieve. The actual components for the GUI (GUI APIs) are present on the Server Core and Server image (not on the Nano Server one). However, the GUI itself is not present. What that means is you can run an application that depends on the GUI APIs, for UI test automation, for example. I blogged about this topic a while ago here: https://techcommunity.microsoft.com/t5/containers/nano-server-x-server-core-x-server-which-base-image-is-the-right/ba-p/2835785

  • I wonder if there is a solution to simulate the pop-up UI after starting the test in docker windows containers because I had some automation tests to lance in the container wish they need GUI to do an actions – Oumaima Idoudi May 19 '22 at 12:57
  • If all you need is an API call, than this could work, but from a development perspective, I wouldn't be able to say which API you'd need. However, if you really need the desktop, than it won't. – Vinicius Apolinario May 23 '22 at 23:13