diff --git a/.dockerignore b/.dockerignore index d055c334463..86de177373f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,6 +3,8 @@ # Except src for building !./src/* +!Directory.Build.props + # TODO : Remove this line when Docker Buildkit works in Windows !/.build/release/* diff --git a/Dockerfile b/Dockerfile index 85b899d1c23..7adafe714ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,9 @@ WORKDIR /app # Copy and build COPY ./src /app -RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 +COPY Directory.Build.props / + +RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:8.0-nanoserver-1809 AS build_windows