I am trying to generate the excel sheet, using EPPlus.Core in dotnet core 2.0 framework. The generation works fine on local machine running windows. When I test the same on Ubuntu docker images, it fails with the below exception:
Unable to load DLL 'libdl': The specified module or one of its dependencies could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.Libdl.dlopen(String fileName, Int32 flag)
at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
The same used to work fine when I used the dotnet core 1.1, with libgdiplus being explicitely installed. But this setup fails with dotnet core 2.0.
The complete docker file is as below:
FROM microsoft/aspnetcore-build:2.0
RUN apt-get update
RUN apt-get install -y libgdiplus
RUN npm install typings -g
COPY . /app
WORKDIR /app/MyWeb
RUN ["dotnet", "--info"]
RUN ["dotnet", "restore"]
EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000
RUN ["dotnet", "publish"]
WORKDIR /app/MyWeb/bin/Debug/netcoreapp2.0/publish
ENTRYPOINT ["dotnet", "MyWeb.dll"]
I am trying to generate the excel sheet, using EPPlus.Core in dotnet core 2.0 framework. The generation works fine on local machine running windows. When I test the same on Ubuntu docker images, it fails with the below exception:
Unable to load DLL 'libdl': The specified module or one of its dependencies could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.Libdl.dlopen(String fileName, Int32 flag)
at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
The same used to work fine when I used the dotnet core 1.1, with libgdiplus being explicitely installed. But this setup fails with dotnet core 2.0.
The complete docker file is as below:
FROM microsoft/aspnetcore-build:2.0
RUN apt-get update
RUN apt-get install -y libgdiplus
RUN npm install typings -g
COPY . /app
WORKDIR /app/MyWeb
RUN ["dotnet", "--info"]
RUN ["dotnet", "restore"]
EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000
RUN ["dotnet", "publish"]
WORKDIR /app/MyWeb/bin/Debug/netcoreapp2.0/publish
ENTRYPOINT ["dotnet", "MyWeb.dll"]