21 lines
701 B
Docker
21 lines
701 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
|
WORKDIR /app
|
|
EXPOSE 8081/udp
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
|
WORKDIR /src
|
|
COPY ["AicsKnowledgeBase_file/AicsKnowledgeBase_file.csproj", "AicsKnowledgeBase_file/"]
|
|
RUN dotnet restore "AicsKnowledgeBase_file/AicsKnowledgeBase_file.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/AicsKnowledgeBase_file"
|
|
RUN dotnet build "AicsKnowledgeBase_file.csproj" -c Release -o /app/build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish "AicsKnowledgeBase_file.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
VOLUME ["/app/ssl", "/app/files"]
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "AicsKnowledgeBase_file.dll"]
|