Fix Docker build by excluding test files and using explicit project path #5

Merged
administrator merged 1 commits from feature/unit-tests into main 2026-06-11 11:12:33 +00:00
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ WORKDIR /src
COPY . . COPY . .
# Restore & publish (self-contained trimming can be added later if desired) # Restore & publish (self-contained trimming can be added later if desired)
RUN dotnet restore RUN dotnet restore SimpleIdp.csproj
RUN dotnet publish -c $BUILD_CONFIGURATION -o /app/publish --no-restore RUN dotnet publish SimpleIdp.csproj -c $BUILD_CONFIGURATION -o /app/publish --no-restore
# ========================= # =========================
# Runtime stage # Runtime stage
+5
View File
@@ -4,6 +4,11 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="SimpleIdp.Tests/**" />
<EmbeddedResource Remove="SimpleIdp.Tests/**" />
<None Remove="SimpleIdp.Tests/**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.3.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.3.0" />
<PackageReference Include="SimpleIdServer.IdServer.Pwd" Version="6.0.*-*" /> <PackageReference Include="SimpleIdServer.IdServer.Pwd" Version="6.0.*-*" />