mcr.microsoft.com/dotnet/core/aspnet:2.1安装libgdiplus

复制代码
#FROM registry-vpc.cn-shanghai.aliyuncs.com/shiningrise/aspnetcore-build:2 AS builder
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS builder
ENV ASPNETCORE_ENVIRONMENT Production
WORKDIR /source
COPY . .
RUN dotnet restore 
RUN dotnet publish --output /app/ --configuration Release  SocialClass.WebApi

FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 AS runtime

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

WORKDIR /app/
COPY --from=builder /app .
EXPOSE 5000
ENV WEIXIN_APPID 微信公众号ID
ENV WEIXIN_APPSECRET 微信公众号密钥
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
#RUN cat ~/.nuget/NuGet/NuGet.Config
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
复制代码

 

posted @   shiningrise  阅读(59)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2022-12-07 Windows删除服务
2016-12-07 vs2015 HTTP Error 400. The request hostname is invalid.
2012-12-07 OAuth2.0资源
2009-12-07 DbEntry.Net3.6 DbEntryDataSource from a database table CodeSimth 模板
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css
点击右上角即可分享
微信分享提示