[Fix] Risolto errore NETSDK1067 nella build Docker Windows
- Sostituito /p:UseAppHost=false con /p:SelfContained=false in entrambi i Dockerfile - .NET 9.0 richiede AppHost per applicazioni self-contained - SelfContained=false è appropriato per container Docker con runtime separato - Fix applicato sia a Dockerfile (Linux) che Dockerfile.windows
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ RUN dotnet build "Data_Coupler.csproj" -c Release -o /app/build
|
|||||||
# Stage 2: Publish
|
# Stage 2: Publish
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish "Data_Coupler.csproj" -c Release -o /app/publish \
|
RUN dotnet publish "Data_Coupler.csproj" -c Release -o /app/publish \
|
||||||
/p:UseAppHost=false \
|
/p:SelfContained=false \
|
||||||
/p:PublishTrimmed=false \
|
/p:PublishTrimmed=false \
|
||||||
/p:PublishSingleFile=false
|
/p:PublishSingleFile=false
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ RUN dotnet build "Data_Coupler.csproj" -c Release -o /o --no-restore
|
|||||||
|
|
||||||
# Stage 2: Publish
|
# Stage 2: Publish
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN dotnet publish "Data_Coupler.csproj" -c Release -o /p --no-restore /p:UseAppHost=false
|
RUN dotnet publish "Data_Coupler.csproj" -c Release -o /p --no-restore /p:SelfContained=false
|
||||||
|
|
||||||
# Stage 3: Runtime
|
# Stage 3: Runtime
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0-nanoserver-ltsc2022 AS final
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0-nanoserver-ltsc2022 AS final
|
||||||
|
|||||||
Reference in New Issue
Block a user