Aggiungere i file di progetto.
This commit is contained in:
23
SeniorAssistant/Dockerfile
Normal file
23
SeniorAssistant/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1803 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 50361
|
||||
EXPOSE 44348
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk-nanoserver-1803 AS build
|
||||
WORKDIR /src
|
||||
COPY ["SeniorAssistant/SeniorAssistant.csproj", "SeniorAssistant/"]
|
||||
RUN dotnet restore "SeniorAssistant/SeniorAssistant.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/SeniorAssistant"
|
||||
RUN dotnet build "SeniorAssistant.csproj" -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "SeniorAssistant.csproj" -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENTRYPOINT ["dotnet", "SeniorAssistant.dll"]
|
||||
Reference in New Issue
Block a user