ClearScriptV8.linux-x64.so not found in the Docker
Closed this issue · 2 comments
pompushko commented
Hello
I use Dotnet8 and ClearScript.V8 7.4.4
Here is my Dockerfile:
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
RUN apt-get update && apt-get install -y libgssapi-krb5-2
USER app
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Project/Project/Project.csproj", "Project/Project/"]
COPY ["Project/Project.Client/Project.Client.csproj", "Project/Project.Client/"]
RUN dotnet restore "./Project/Project/./Project.csproj"
COPY . .
WORKDIR "/src/Project/Project"
RUN dotnet build "./Project.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./Project.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Project.dll"]
I use Windows with VS for developing and it all works fine. But running my project under the Linux in Docker.
Maybe there should be something else, not Microsoft.ClearScript.V8.Native.win-x64?
<PackageReference Include="Microsoft.ClearScript.V8" Version="7.4.4" />
<PackageReference Include="Microsoft.ClearScript.V8.Native.win-x64" Version="7.4.4" />
Also, here is my error:
Internal Server Error: Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.linux-x64.so:
/app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so: Unable to load shared library '/app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/app/runtimes/linux-x64/native/ClearScriptV8.linux-x64.so: cannot open shared object file: No such file or directory
/app/ClearScriptV8.linux-x64.so: Unable to load shared library '/app/ClearScriptV8.linux-x64.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/app/ClearScriptV8.linux-x64.so: cannot open shared object file: No such file or directory
Should I add a Microsoft.ClearScript.V8.Native.linux-x64 package?
Thank you!
ClearScriptLib commented
Hi @pompushko,
Should I add a Microsoft.ClearScript.V8.Native.linux-x64 package?
Yes, please try that. Thanks!
pompushko commented
Yeah. My bad. All works fine after that. Thank you :)