microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.02k stars 399 forks source link

Docker: System.DllNotFoundException: Unable to load shared library 'libFabricCommon.so' or one of its dependencies. #362

Open michelesolytic opened 4 years ago

michelesolytic commented 4 years ago

While trying to start a service fabric application from a docker container, the following runtime error is prompted:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Fabric.Common.AppTrace' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'libFabricCommon.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibFabricCommon.so.so: cannot open shared object file: No such file or directory

It seems like a library related to service fabric cannot be found. Also notice the reference to "liblibFabricCommon.so.so" (??) at the end of the error. That seems weird, as I am both compiling and attempting to start the application within the same container, build on the microsoft/dotnet:2.2-sdk image. The compilation is however successful. Here follows my Dockerfile:

FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /src
COPY . .
WORKDIR /src/ThirdPartyDataFabricService
RUN dotnet restore
RUN dotnet build -c Release
RUN dotnet publish -o /app
WORKDIR /app
ENTRYPOINT ["dotnet", "Brand.Services.ThirdPartyDataApplication.dll"]

Am I missing something?

MattHartz commented 4 years ago

I am getting this too. Manage to find an answer @michelesolytic ?