Windows GUI support in Docker

I’ve a windows application with both UI written in C# and C++. They are written with WPF and Winforms etc.
Can I create a docker container for this?
So, I could only find UI support with a browser but not anything on GUI support for windows application in a container.

As of now I created a c++ console exe and displaying a messagebox…and when a image/container is created and run the messagebox does not show up and the the container is stuck.

Any help is highly appreciated?

Thanks in advance,
Kajal

1 Like

Docker currently does not support Windows GUI applications at all.

But through X11 connection with the DISPLAY env. variable is it not possible? like its done in the linux OS for GUI apps…

I’m afraid not. Windows does not use X11.

Thanks rajchaudhuri for your prompt response.
Do you know if Docker’s team plans to have this feature in the future?

Thank you.

I don’t know, and I suspect something like this would require work by Microsoft, not just the Docker team.

Just wanted to confirm, if this feature is still not possible or with newer releases this is possible now? Most of the threads, I am reading are a year old, so wanted to confirm.

This is just sad. There are SO many Windows developers who need WinForms support and it seems impossible to get a definitive, up-to-date, YES/NO. I asked the same question and received no reply.

Is it possible to run WinForms applications and interact with them, in a Docker container?
(No, it hasn’t been, but has anything changed or is anything likely to change?)

If so, how?
If not, can you give us any idea if this is likely to happen, and when it might be possible, please?

We have a large amount of legacy applications we would LOVE to containerize but we are just wasting time with Docker if it cannot and never will do this. If it is being looked at and is slated for the future, an estimate of when it might be available would help us to forward plan.

I don’t understand why this is so hard… Is it because it is Open Source and nobody is actually responsible for it?

@petedashwood: I don’t see Microsoft ever making Windows fully “containerizable” (i.e. including its graphical environment). Reasons: a) already having a similar offering (Windows Terminal Server), b) internal effort and/or unwillingness to open their codebase to the community, and c) a licensing structure that could be either too difficult to implement and control or prove cost-ineffective for clients. I hope this answers the question as a clear, up-to-date NO.

Possible workarounds (AFAICT): a) Linux+Wine (or CrossOver), b) Windows Terminal Server (or similar), c) Virtual Machines (Hyper-V, vmWare, VirtualBox, etc), and d) third-party proprietary solutions.

Thank you for this succinct and insightful reply.

I believe you are right.

We have been forced to abandon containerization because of this and have sought other solutions.

Linux/Wine is not an option for us because it would be too big an effort to move all of the existing Windows investment to Linux.

Windows Terminal Server and VMs are a definite possibility and we are exploring those at the moment.

For myself, I am really sorry that we had to drop containerization because I really liked Docker, but the needs of the company outweigh any personal preferences I might have.

Thanks again for an excellent response; I only wish someone had been able to offer it a couple of years ago, when it could have saved us a large amount of time and effort.