YD_Event.Admin/Dockerfile

40 lines
1.3 KiB
Docker
Raw Permalink Normal View History

2025-12-17 10:32:52 +08:00
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
#<23>޸<EFBFBD>apt-getԴ<74><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>apt<70><74><EFBFBD><EFBFBD>
#RUN sed -i s@/deb.debian.org/@/mirrors.163.com/@g /etc/apt/sources.list.d/debian.sources
#RUN cat /etc/apt/sources.list
#<23><>װfontconfig
RUN apt-get clean
RUN apt-get update
RUN apt-get install -y fontconfig
WORKDIR /app
EXPOSE 8066
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY ["Easy.Admin.Web.Entry/Easy.Admin.Web.Entry.csproj", "Easy.Admin.Web.Entry/"]
COPY ["Easy.Admin.Web.Core/Easy.Admin.Web.Core.csproj", "Easy.Admin.Web.Core/"]
COPY ["Easy.Admin.Application/Easy.Admin.Application.csproj", "Easy.Admin.Application/"]
COPY ["Easy.Admin.Core/Easy.Admin.Core.csproj", "Easy.Admin.Core/"]
RUN dotnet restore "Easy.Admin.Web.Entry/Easy.Admin.Web.Entry.csproj"
COPY . .
WORKDIR "/src/Easy.Admin.Web.Entry"
RUN dotnet build "Easy.Admin.Web.Entry.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Easy.Admin.Web.Entry.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
# <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
ENV TZ=Asia/Shanghai
ENV ASPNETCORE_URLS 'http://*:8066'
ENTRYPOINT ["dotnet", "Easy.Admin.Web.Entry.dll"]