How to Install Azure Service Fabric SDK on Windows Docker Container?

0

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?

azure-service-fabric
actor
docker-for-windows
service-fabric-stateful
service-fabric-actor
asked on Stack Overflow Aug 8, 2020 by satya

1 Answer

0

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.

answered on Stack Overflow Aug 17, 2020 by LoekD

User contributions licensed under CC BY-SA 3.0