FROM newbe36524/aspnet:5.0-buster-slim AS base ENV TZ=Asia/Shanghai WORKDIR /app EXPOSE 3400 3400 RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list RUN apt-get clean RUN apt-get update # 安装libgdiplus库解决System.Drawing引起的Bug RUN apt-get install -y --allow-unauthenticated libgdiplus libc6-dev fontconfig RUN ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll COPY ./ ./ ENTRYPOINT ["dotnet", "form.dll"]
下面是.net 6 发布的dockerflie
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base ENV TZ=Asia/Shanghai WORKDIR /app EXPOSE 5240 5240 RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list RUN apt-get clean RUN apt-get update # 安装libgdiplus库解决System.Drawing引起的Bug RUN apt-get install -y --allow-unauthenticated libgdiplus libc6-dev fontconfig RUN ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll COPY ./ ./ ENTRYPOINT ["dotnet", "OneLove.VipUser.Interface.dll"]