分支自 SuZhouGuanHong/TaiYuanTaiZhong

huanghongfeng
2024-07-08 32678f5c24c7681a198b517fa72db1de2e98646d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#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/aspnet:6.0 AS base
RUN apt-get update; apt-get install libfontconfig1 -y
 
WORKDIR /app
EXPOSE 9991
 
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["WIDESEA_WebApi/WIDESEA_WebApi.csproj", "WIDESEA_WebApi/"]
COPY ["WIDESEA_System/WIDESEA_System.csproj", "WIDESEA_System/"]
COPY ["WIDESEA_Core/WIDESEA_Core.csproj", "WIDESEA_Core/"]
COPY ["WIDESEA_Entity/WIDESEA_Entity.csproj", "WIDESEA_Entity/"]
COPY ["WIDESEA_Order/WIDESEA_Order.csproj", "WIDESEA_Order/"]
COPY ["WIDESEA_AppManager/WIDESEA_AppManager.csproj", "WIDESEA_AppManager/"]
COPY ["WIDESEA_Builder/WIDESEA_Builder.csproj", "WIDESEA_Builder/"]
RUN dotnet restore "WIDESEA_WebApi/WIDESEA_WebApi.csproj"
COPY . .
WORKDIR "/src/WIDESEA_WebApi"
RUN dotnet build "WIDESEA_WebApi.csproj" -c Release -o /app/build
 
FROM build AS publish
RUN dotnet publish "WIDESEA_WebApi.csproj" -c Release -o /app/publish
 
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WIDESEA_WebApi.dll"]