Added Dockerfile for csharp project to be able to run tests in container

This commit is contained in:
Tomas Liska
2021-11-26 20:04:42 +01:00
parent a55f78b852
commit ab80156cd1
2 changed files with 18 additions and 0 deletions

13
csharp/Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine as build
WORKDIR /app
COPY *.sln .
COPY TheatricalPlayersRefactoringKata/*.csproj ./TheatricalPlayersRefactoringKata/
COPY TheatricalPlayersRefactoringKata.Tests/*.csproj ./TheatricalPlayersRefactoringKata.Tests/
RUN dotnet restore
COPY . .
RUN dotnet build
FROM build AS test
RUN dotnet test --logger:console;verbosity=detailed