Variations of this questions have been asked before, but I could not find an answer that works for me so far. I might miss some fundamental concept and would be thankful for advices or pointers that could help.
What I try to accomplish:
- I have a legacy Windows-only application (binary) that I try to dockerize in a single container along my own .NET 5 application.
- The legacy application ships with a custom communication library that I use to communicate with instances of the legacy application. The communication between the library and the legacy application is based on WCF NamedPipes (net.pipe).
- I am aware that the problem could be solved by avoiding NamedPipes and go for a proper TCP channel. Unfortunately, this is out of my control.
The problem:
- I use mcr.microsoft.com/windows/servercore as base image and managed to successfully run instances of the two applications in the container. The communication via NamedPipes does not work however.
- Running both applications natively on my Windows 10 machine, works just fine.
- I cannot dig deeper into the actual error, but it seems to be related to the failing NamedPipe communication.
What I tried:
- Other posts suggest to enable the Windows feature for WCF NamesPipes, such as this one. So I added the following lines to the Dockerfile:
SHELL ["powershell"] RUN Install-WindowsFeature -name NET-WCF-Pipe-Activation45
- Other suggested lines did not apply to my case, as they seem IIS specific, such as this one:
New-ItemProperty 'IIS:\Sites\wcf' -name bindings -Value @{protocol='net.pipe';bindingInformation='localhost/folder1/folder2'} -Force;
- I know the names of the NamedPipes created by the application, so I also tried to mount the NamedPipes into the container (although, I know this should not be required when communication inside the container only).