I am new to Docker and containers and I am trying to figure out if I can create a container for a 3rd party desktop application we use. I am trying to run multiple instances of this application on one computer but the application restricts it to one runtime. Is it possible to take the application and isolate it in a few containers that run at the same time?
I am fairly confident that I could create some VM’s and run the application on those but that approach would waste the resources of the computer. Is Docker capable of doing this? If yes then where can I look to start? (There was another similar post from 2019 that received no replies. Deploying a Windows Desktop Application)
There are many similar topic I think. Try to search for “GUI”.
Docker is not designed for desktop apps. It is possible in Linux and but I am not sure it is on Windows. Since you can run desktop apps remotely on Linux and send the graphical interface back to the client, it is an option with Linux containers too but you will not get the same experience as you would running the app without container so I wouldn’t do it with apps I want to deliver to other people. When I say you will not get the same experience I mean when I have problem on Linux, it almost always related to the GUI. Soething missing or I run into a bug in the window manager. Imagine it in a container. You have to do it perfectly. Sometimes the window just looks bad, sometimes the navigation doesn’t work and so on.
So it is good to play with and I like to try it from time to time but If you want to run stable desktop apps in a container, I don’t recommend Docker. There are other tools running desktop apps in an isolated environment like Flatpak, AppImage or even snap
I don’t know if there are any real Windows alternatives. There is Windows Sandbox but that is only a temporary sandbox for one instance.
It seems that the issue is a stability issue with windows apps that have a GUI? Unfortunately, the app was only built for windows and does not have Linux support.
You mentioned Windows Sandbox and that it is temporary. The application I am trying to run is just an interface that takes in data from our PLC and displays it. I don’t think it being a temporary sandbox will be an issue. My concern is that a sandbox is basically like a temporary VM meaning it would still waste to system resources?
Is it possible to create a Docker that runs similar to a sandbox but the program is the only thing that remains or is included in each creation of the instance?
I was writing about Linux since I don’t know how it is possible on Windows at all.
Microsoft states
Efficient: Uses the integrated kernel scheduler, smart memory management, and virtual GPU.
I have just tried and it used only 168MB memory and nearly no CPU according to the Task Manager. I didn’t do anything inside the sandbox though.
I don’t know any way. You have to choose from available base containers or build from scratch which I don’t know how to do either. Windows containers are not so advanced as Linux containers as I mention in another topic which I tried to find and failed
Again I am new to Docker but from what I have read so far it seems theoretically possible to wrap the Windows application in a container and then run on a Microsoft server Image. I need to do some more digging into the documentation for the .NET dockers. I am still at a lost because most documentation explains how to take your personally created application (which you have a build file for already) and use that file to build the container. This is an application that I do not have access to the build file. Is there a resource that explains how to containerize a pre-built app that’s not JavaScript?
Docker is the application. There are no “dockers” in this context, only containers and images.
It is because it is much easier to build an app in an isolated environment than finding every required file on the host and copy into a container. In order to automate this process you would have to look into binaries containing references to configuration files and dependencies and manipulate registry which is actually the easier part. If you have a single binary or a single folder without any dependency, you could copy the app into the container without any problem.