相关文章推荐

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

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
              

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

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

 
推荐文章