System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies .NET Core 图片操作在 Linux/Docker 下的坑

摘要:
#秒eehttps://aka.ms/containerfastmodetounderstandhowVisualStudiousesthisDockerfiletobuildyourimagesforfasterdebugging.FROMmcr.microsoft.com/dotnet/core/aspnet:3.1-buster slimASbaseWORKDIR/appEXPOSE80EX
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

RUN echo "deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib 
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib 
deb http://mirrors.aliyun.com/debian-security stretch/updates main 
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main 
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib 
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib 
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib 
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib" > /etc/apt/sources.list
 
RUN apt-get update -y && apt-get install -y libgdiplus && apt-get clean && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["xxx/xxx.csproj", "xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
COPY ["xxx/xxx.xxx.csproj", "xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
COPY ["xxx.xxx/xxx.xxx.csproj", "xxx.xxx/"]
RUN dotnet restore "xxx/xxx.csproj"
COPY . .
WORKDIR "/src/xxx"
RUN dotnet build "xxx.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "xxx.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "xxx.dll"]

参考文章:https://www.cnblogs.com/stulzq/p/10172550.html

                  https://www.cnblogs.com/stulzq/p/9339250.html

免责声明:文章转载自《System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies .NET Core 图片操作在 Linux/Docker 下的坑》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇RabbitMQ---6、客户端 API 的简介idea开启springboot热部署,修改文件即时生效下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

随便看看

UOS怎么安装谷歌浏览器

这是安装完成的截图点击UOS左下角启动器图标,拉至最底下,找到“Chromium网页浏览器”,点击启动以下是启动的界面截图...

Mock 基本使用

特殊的格式,例如IP,随机数,图片,地址,需要去收集二、mock优点1、前后端分离让前端工程师独立于后端进行开发。表示需要拦截的Ajax请求类型。表示数据模板,可以是对象或字符串。表示用于生成响应数据的函数。...

【使用 DOM】为DOM元素设置样式

DOCTYPE html˃设置DOM元素的样式p{border:中双绿色;背景颜色:浅灰色;}#block1{color:白色;}table{border:thinsolided;border collapse:collapse;margin:5px;float:left;}td{padding:2px;}#block2{color:yellow;font-...

Jmeter中获取返回结果中的值

在jmeter的测试中,通常需要在下一个请求中使用上一个请求的返回值。如何获得返回值非常重要。插件下载地址为:http://jmeter-plugins.org/wiki/JSONPathExtractor/下载后,将lib文件夹放在jmeter目录中。...

zookeeper 日志输出到指定文件夹

最近,我在学习ZookeperStormKafka。顺便说一下,我在本地建立了一个集群。我遇到了Zookeeper日志输出路径的问题。我发现设置log4j。Zookeeper中的属性无法解决日志路径问题。我发现解决方案如下:1.修改log4j属性,您应该能够更改它。我更改了红色粗体,但仍然没有生效。#定义要移动的默认值...

html2canvas踩坑日记

在html2canvas<html2canvas(document.querySelector(“#capture”)).then(canvas=>{document.body.appendChild(canvas)});//图片地址是文档。身体appendChild(画布);...