Bui Quang Huy
Bui Quang Huy

Reputation: 1794

Unable to load shared library 'kernel32.dll' or one of its dependencies

I tried to run console application Net core with Docker but got this error when start the container.

Exception: Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32.dll: cannot open shared object file: No such file or directory

This is my Dockerfile

FROM mcr.microsoft.com/dotnet/core/runtime:2.2
WORKDIR /app 
COPY . /app
ENTRYPOINT ["dotnet", "Application.dll"]

Anyone face this issue?

Upvotes: 3

Views: 9904

Answers (1)

VonC
VonC

Reputation: 1328122

Check if dotnet/dotnet-docker issue 618, which does report a similar error message could help.

Make sure you install it in your runtime and not in your dotnet build.

Moving the install up to under FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base solved my issue

Upvotes: 0

Related Questions