0
votes

We have asp.net core application running inside a Docker container hosted on Service Fabric cluster. We are getting below error while creating actor which is hosted in the same cluster from asp.net core application.

Unable to load DLL 'FabricCommon.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

This could be because the docker container doesn’t have the service fabric runtime. Can someone point out how to install Service Fabric SDK in windows docker container or Can someone suggests on other approaches to activate service fabric actor from the docker container?

1
Can you share your package references in your question? Are you trimming the exe?Preben Huybrechts

1 Answers

0
votes

There's documentation for that here. They use PowerShell to download and install the runtime from the Dockerfile:

ADD https://raw.githubusercontent.com/microsoft/service-fabric-scripts-and-templates/master/docker/service-fabric-reliableservices-windowsservercore/InstallPreReq.ps1 /
RUN powershell -File C:\InstallPreReq.ps1
RUN setx PATH "%PATH%;C:\sffabricbin;C:\sffabricruntimeload" /M

Run this code to load the binaries during startup:

internal static class Program
{
       static Program()
       {
           SFBinaryLoader.Initialize();
       }

and configure the application settings according to the docs.

After that, you should be able to interact with the SF runtime.