docker compose Build schlug bei Dokploy fehl: "A compatible .NET SDK was not found". global.json pinnt exakt 10.0.301 mit rollForward: latestPatch (erlaubt nur neuere Patches im selben Feature-Band), der treibende Tag mcr.microsoft.com/dotnet/sdk:10.0 zeigte inzwischen aber auf 10.0.400 (neues Feature-Band) - latestPatch lehnt das ab. Build-Stage in Dockerfile.api auf den exakten Tag 10.0.301 gepinnt, TODO.md 10.2.4 um den Vorfall ergänzt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
23 lines
997 B
Docker
23 lines
997 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
|
|
WORKDIR /app
|
|
|
|
# Muss exakt zu global.json (rollForward: latestPatch) passen - der treibende ":10.0"-Tag zeigt
|
|
# irgendwann auf ein neueres Feature-Band (z.B. 10.0.400), das latestPatch nicht akzeptiert und
|
|
# den Build mit "A compatible .NET SDK was not found" abbrechen lässt.
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0.301 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"]
|