zoukankan      html  css  js  c++  java
  • System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies .NET Core 图片操作在 Linux/Docker 下的坑

    #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

  • 相关阅读:
    高并发系统中的常见问题
    区块链需要解决诸多问题
    什么是“区块链”技术
    github源码开源区块链浏览器
    JavaScript 内存
    行为驱动开发(BDD)
    Vue.js
    Net程序员学习Linux
    Mybatis数据操作
    Metatable和Metamethod(转)
  • 原文地址:https://www.cnblogs.com/lkd3063601/p/12672360.html
Copyright © 2011-2022 走看看