I have a dotnet project that work when i do dotnet run, i am trying to containerize that dotnet project. For that i have create the Dockerfile as below:
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
COPY bin/Release/netcoreapp3.1/publish/ App/
WORKDIR /App
EXPOSE 5000
CMD ["dotnet", "MediatorAgent.dll"]
Before creating the docker image i did run dotnet publish -c Release
. Now when i try to run this docker image, i am getting the below error
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'indy' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libindy: cannot open shared object file: No such file or directory
I am following the instruction for Containerize a .NET Core app for creating docker image.
Well, you did it.
What is likely to have gone wrong is that the DLL refered to as
indy
is not copied to the App folder.Since you are copying the data, please verify it's included in the original build at
bin/Release/netcoreapp3.1/publish