I am not certain a solution exists for this but thought of asking the experts…
I have a very complex application that has the following components:
1 - A local (on a Windows 11 Pro PC) third party accounting system - vendor app.
2 - A local developed console application - let’s call it (AccInterface.exe) that is used to access (i.e. query, insert, update the 3rd party windows accounting application).
3 - A MySQL Linus Docker Container - 64-bit
4 - A ASP NET Core Web API (.net 10) - 64-bit
5 - A Blazer Web App (.net 10) - 64-bit
I would like to have all of the following three in separate containers (MySQL, ASP NET Core Web API, Blazer Web App). I know that this is possible BUT here is the catch.
First, I had to create the console app because the accounting vendor DOES NOT SUPPORT anything but .NET 4.8.1 AND is only 32-bit - YUCK… We don’t build anything but 64-bit using latest frameworks.
So, here is how the application works:
The user connects to the Blazer app using a browser. The user is authenticated via external Auth0 and receives a User Token. The User Token determines what “rights” the user has within the Blazer App (i.e. RBAC).
When Blazer needs data it sends a request to the ASP NET Core Web API along with an Access Token that is associated to the User Token and is provided by Aut0. The Access Token identifies at the element level what API’s the user has access to.
Assuming the user has access to the controller AND the API needs to get data from the accounting system the following steps are done:
1 - A unique identifier is inserted into the MYSQL Interface Table with other information needed for context.
2 - The unique identifier is encrypted.
3 - The ASP NET Core Web API executes a ProcessStartInfo (AccInterface.exe) with an argument of the unique identifier. This is to ensure that only valid requests are executed.
4 - I process the data depending on the output or need.
So, question. so, how can you do this.
Starting from WITHIN A container execute a console app that is on the localhost (i.e. d:\Help\AccInterface.exe uniqueID).
The above is working with only MySql in a Docker container and the rest on localhost so don’t have to worry about the different OS’s.
Thanks for the detailed description, but I’m still trying to understand what is your issue. I understand that you have an accounting system that runs on the host and you made an interface for it that you can use from other apps running in containers. Is it correct?
I’m a little confused, because first you refer to AccInterface as console application, and later you write that
I guess localhost in this context means the Windows host, bnut not sure what “from within a container execute” means. Does it mean that you communicate with the console app on the host from a container?
Can you be more specific about what you want to solve? For example how you can run Linux containers on Windows, or how you can control an app on Windows when the controller is in a container? Or how you can communicate with the database running in a container when the app that uses it is on the host?
My previous assumptions could be totalyl wrong, I just tried to share some examples.
What I need to do is from the API solution that is in a Docker container (let’s assume Linux), start a Console App that resides on the Windows 11 host computer that Docker Desktop sits on. The console app needs to run with the host Windows OS not within the Docket container.
If you already have a running API server on Windows, you can control other apps through that API over network, but you can’t start Windows apps directly from another machine. From a VM in this case.
Sicne you have to start Docker somehow on Windows, you could also start another app that is waiting for requests from the VM to start other Windows apps that don’t have to run all the time.
If you want to run Linux containers, you either (1) use Docker Desktop, (2) start a Linux VM directly and install Docker CE in it, or (3) use a WSL2 distro and install Docker CE in it. Since Docker Desktop is mainly for development and WSL2 is (as far as I know) not for running apps for long as a server, you could end up with running a VM with HyperV. But it depends on your goals. If this app is for you or a few number of colleagues used on their Windows desktop, I guess Docker Desktop could be fine too, but when you start to run it for long, you could have memory issues based on users’ reports.