Docker Community Forums

Share and learn in the Docker community.

Windows Application 32 bit COM dll registration


(Gacracker777) #1

I have a very large WinForms application that i would like to deploy via docker.
The application is composed of hundreds of COM dlls that require registration.
The application is also composed of many .NET assemblies on Framework 4.62. Some of which also require COM registration.
The application needs access to remote and/or local file storage as well and SQL server. Assumption is that SQL Server is managed by the host OS as i do not plan to include it in a container.

How do I deploy COM dlls in a Container that need to be registered ?
Please point me to any resources that would be helpful based on the information above.

Thank you


(Raj Chaudhuri) #2

Windows GUI applications cannot run in containers, as of today. So containerizing your WinForms app may not be worth the effort, especially because it also involves 32-bit COM dlls.

That said, if you were containerizing a non-GUI service type of application, registering 32-bit COM dlls in containers is the same as registering them on regular Windows. Start from the microsoft/windowsservercore image, and use %WINDIR%\syswow64\regsvr32.exe.

Example Dockerfile:

FROM microsoft/windowsservercore
COPY your32bitCOM.dll C:\SomeDirectory\your32bitCOM.dll
RUN %WINDIR%\syswow64\regsvr32.exe C:\SomeDirectory\your32bitCOM.dll
...

(Sk5277) #3

I have same problem but Not working when I tried with following code:

FROM microsoft/windowsservercore
COPY your32bitCOM.dll C:\SomeDirectory\your32bitCOM.dll
RUN %WINDIR%\syswow64\regsvr32.exe C:\SomeDirectory\your32bitCOM.dll


(Artisticcheese) #4

You need to add /S to regsvc32.exe since EXE shows UI at the end of registration and it hangs at that point


(Sk5277) #5

According to my knowledge there is no need to add /S because RUN command already added /S while executing any command.

Same issue as above link given below

Issue on github(Microsoft iis-docker )