FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /src COPY ["LehrerApp.Api/LehrerApp.Api.csproj", "LehrerApp.Api/"] COPY ["LehrerApp.Sync/LehrerApp.Sync.csproj", "LehrerApp.Sync/"] COPY ["LehrerApp.Core/LehrerApp.Core.csproj", "LehrerApp.Core/"] COPY ["LehrerApp.Data/LehrerApp.Data.csproj", "LehrerApp.Data/"] COPY ["Directory.Build.props", "."] COPY ["Directory.Packages.props", "."] RUN dotnet restore "LehrerApp.Api/LehrerApp.Api.csproj" COPY . . RUN dotnet publish "LehrerApp.Api/LehrerApp.Api.csproj" -c Release -o /app/publish FROM base AS final COPY --from=build /app/publish . RUN mkdir -p /app/data ENTRYPOINT ["dotnet", "LehrerApp.Api.dll"]