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 @ 2023-12-07 13:27  shiningrise  阅读(50)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css