From e68794c98b0dbae17376553e8abb901389af3ed6 Mon Sep 17 00:00:00 2001 From: Lucas DELANIER Date: Sun, 5 Mar 2023 01:46:59 +0100 Subject: [PATCH] Ajouter 'Sources/MovieFinder_API/Dockerfile' --- Sources/MovieFinder_API/Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Sources/MovieFinder_API/Dockerfile diff --git a/Sources/MovieFinder_API/Dockerfile b/Sources/MovieFinder_API/Dockerfile new file mode 100644 index 0000000..767e4e8 --- /dev/null +++ b/Sources/MovieFinder_API/Dockerfile @@ -0,0 +1,26 @@ +#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 +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /src +COPY ["APILOL/APILOL.csproj", "APILOL/"] +COPY ["DTO/DTO.csproj", "DTO/"] +COPY ["Model/Model.csproj", "Model/"] +COPY ["Shared/Shared.csproj", "Shared/"] +COPY ["StubLib/StubLib.csproj", "StubLib/"] +RUN dotnet restore "APILOL/APILOL.csproj" +COPY . . +WORKDIR "/src/APILOL" +RUN dotnet build "APILOL.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "APILOL.csproj" -c Release -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "APILOL.dll"] \ No newline at end of file