google-cloud-dotnet: Failed to load gRPC lib in Docker
I’m running my app in Docker (linux x64 environment). And the service fails to start because of the error:
System.IO.IOException: Error loading native library \"/app/runtimes/linux/native/libgrpc_csharp_ext.x64.so\". Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/runtimes/linux/native/libgrpc_csharp_ext.x64.so)
So it is trying to load gRPC library from runtimes/....
folder. But whenever I publish the project locally (with Linux target) I see this library in the project output root. So it looks like it is trying to load the library from the wrong location.
Does anyone have the same issue?
The build command is nothing specific (tried with and without -r
flag.):
RUN dotnet publish -c Release [-r linux-x64]...
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
There is a little issue with the fix, it makes the container exposed to CVE-2019-14697 with 7.5 score.