我正在研究一个asp.net core 3项目,并且我使用Rotativa生成pdf文件。
当我在Windows上运行时,wkhtml2pdf.exe可以正常工作,但是当我尝试在Linux docker映像中运行该应用程序时,出现此错误:
Exception: /app/Rotativa/wkhtmltopdf: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
我使用默认的Dockerfile(由Visual Studio生成)。
我认为我必须在映像中安装libjpeg,但是我不知道该怎么做。
我试图在Dockerfile中使用apt-get安装它,但是有一个错误:
The command '/bin/sh -c apt-get install -y libjpeg-dev' returned a non-zero code: 100
如何使wkhtml2pdf在我的docker映像中工作?