This commit is contained in:
Damien Ostler 2024-01-27 08:32:13 -05:00
parent a83c97de6b
commit f772acac77

View File

@ -11,12 +11,14 @@ COPY ["/src/ArtPlatform.API/ArtPlatform.API.csproj", "ArtPlatform.API/"]
COPY ["/src/ArtPlatform.Database/ArtPlatform.Database.csproj", "ArtPlatform.Database/"] COPY ["/src/ArtPlatform.Database/ArtPlatform.Database.csproj", "ArtPlatform.Database/"]
RUN dotnet restore "ArtPlatform.API/ArtPlatform.API.csproj" RUN dotnet restore "ArtPlatform.API/ArtPlatform.API.csproj"
COPY . . COPY . .
WORKDIR "/src/ArtPlatform.API/ArtPlatform.API" WORKDIR "/src/ArtPlatform.API"
RUN dotnet build "ArtPlatform.API.csproj" -c $BUILD_CONFIGURATION -o /app/build RUN dotnet build "ArtPlatform.API.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "ArtPlatform.API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false RUN dotnet publish "ArtPlatform.API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=build /app/publish . COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ArtPlatform.API.dll"] ENTRYPOINT ["dotnet", "ArtPlatform.API.dll"]