added Testfolder to Copy in Dockerfile
This commit is contained in:
@@ -5,11 +5,12 @@ WORKDIR /app
|
|||||||
# 1. Nur Projektdatei kopieren und Abhängigkeiten laden (Nutzt Docker-Caching)
|
# 1. Nur Projektdatei kopieren und Abhängigkeiten laden (Nutzt Docker-Caching)
|
||||||
COPY *.sln ./
|
COPY *.sln ./
|
||||||
COPY MyHelloWorld/*.csproj ./MyHelloWorld/
|
COPY MyHelloWorld/*.csproj ./MyHelloWorld/
|
||||||
|
COPY MyHelloWorld.Tests/*.csproj ./MyHelloWorld.Tests/
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
|
|
||||||
# 2. Den restlichen Quellcode kopieren und die App kompilieren
|
# 2. Den restlichen Quellcode kopieren und die App kompilieren
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish -c Release -o out
|
RUN dotnet publish MyHelloWorld/*.csproj -c Release -o out
|
||||||
|
|
||||||
# --- Stage 2: Runtime (Das fertige, schlanke Image) ---
|
# --- Stage 2: Runtime (Das fertige, schlanke Image) ---
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||||
|
|||||||
Reference in New Issue
Block a user