From 7d817799c807478b8b0b8012f40e1798bc1f2bf0 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Tue, 28 Apr 2026 16:30:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D0=BB=20Do?= =?UTF-8?q?cker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/UniVerse.Api/Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/UniVerse.Api/Dockerfile b/backend/UniVerse.Api/Dockerfile index 2d0888c..36cb69a 100644 --- a/backend/UniVerse.Api/Dockerfile +++ b/backend/UniVerse.Api/Dockerfile @@ -1,4 +1,5 @@ FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base +ARG APP_UID=1000 USER $APP_UID WORKDIR /app EXPOSE 8080 @@ -7,17 +8,20 @@ EXPOSE 8081 FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src -COPY ["UniVerse/UniVerse.csproj", "UniVerse/"] -RUN dotnet restore "UniVerse/UniVerse.csproj" +COPY ["UniVerse.Api/UniVerse.Api.csproj", "UniVerse.Api/"] +COPY ["UniVerse.Application/UniVerse.Application.csproj", "UniVerse.Application/"] +COPY ["UniVerse.Domain/UniVerse.Domain.csproj", "UniVerse.Domain/"] +COPY ["UniVerse.Infrastructure/UniVerse.Infrastructure.csproj", "UniVerse.Infrastructure/"] +RUN dotnet restore "UniVerse.Api/UniVerse.Api.csproj" COPY . . -WORKDIR "/src/UniVerse" -RUN dotnet build "./UniVerse.csproj" -c $BUILD_CONFIGURATION -o /app/build +WORKDIR "/src/UniVerse.Api" +RUN dotnet build "./UniVerse.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish ARG BUILD_CONFIGURATION=Release -RUN dotnet publish "./UniVerse.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false +RUN dotnet publish "./UniVerse.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "UniVerse.dll"] +ENTRYPOINT ["dotnet", "UniVerse.Api.dll"]