added Testfolder to Copy in Dockerfile
All checks were successful
Tests / Declarative: Post Actions passed: 1
csharp-secdevops-pipeline-pod/pipeline/head This commit looks good

This commit is contained in:
2026-05-06 13:54:38 +02:00
parent ad354bbeaf
commit ac94391ae4

View File

@@ -5,11 +5,12 @@ WORKDIR /app
# 1. Nur Projektdatei kopieren und Abhängigkeiten laden (Nutzt Docker-Caching)
COPY *.sln ./
COPY MyHelloWorld/*.csproj ./MyHelloWorld/
COPY MyHelloWorld.Tests/*.csproj ./MyHelloWorld.Tests/
RUN dotnet restore
# 2. Den restlichen Quellcode kopieren und die App kompilieren
COPY . ./
RUN dotnet publish -c Release -o out
RUN dotnet publish MyHelloWorld/*.csproj -c Release -o out
# --- Stage 2: Runtime (Das fertige, schlanke Image) ---
FROM mcr.microsoft.com/dotnet/aspnet:8.0