I have a COTS Product that runs as a windows service on a Windows 2012 or 2016 Server. This is a .Net 4.5 based application. Unfortunately, I do not have the option of re-architecting this application because I do not have access to the source code.
This is the main issue. The windows service application is dependent on Windows Registry. The service reads from and writes to windows registry.
I’d like to run multiple instances of the same service on the same host. But, if I do that, I’ll have multiple services writing to the same windows registry keys and that would create runtime problems.
Is there a way to containerize this type of application without re-architecting it?
Yes. The fact that you can’t re-architect your app is not an inhibitor at all, and is actually quite common. Even without decomposition into micro services, there is still significant benefit in have a Docker container as a unit of deployment and scale (and in fact micro services can be somewhat of a double edged sword - distributed apps are hard).
Google Elton Stoneman, he has a whole blog series and set of YouTube videos that go into this area. He also has an excellent book ‘Docker on Windows’ which provides a thorough grounding and lots of useful techniques.
Have you confirmed that your containers are writing to the host’s registry? I don’t have a Windows Docker host available to me at the moment, but I don’t remember having this problem when I was writing to the Windows Registry in the container. A main feature of Docker is isolation from the host and the other containers.