From 90e012942b44f4818f2eca82e186fa0a507b436f Mon Sep 17 00:00:00 2001 From: ford-at-aws Date: Tue, 3 Oct 2023 10:32:08 -0400 Subject: [PATCH] dotnet fix --- dotnetv3/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dotnetv3/Dockerfile b/dotnetv3/Dockerfile index 716567a801a..e4d5b6849cb 100644 --- a/dotnetv3/Dockerfile +++ b/dotnetv3/Dockerfile @@ -1,13 +1,15 @@ # syntax=docker/dockerfile:1 FROM mcr.microsoft.com/dotnet/sdk:6.0 -# Copy source code -COPY . /dotnetv3 - -# Perform build steps +# Enable the .NET 5.0 SDK if running 5.0 examples: COPY --from=mcr.microsoft.com/dotnet/sdk:5.0 /usr/share/dotnet/sdk /usr/share/dotnet/sdk COPY --from=mcr.microsoft.com/dotnet/sdk:5.0 /usr/share/dotnet/shared /usr/share/dotnet/shared +# Copy the dotnetv3 folder and run unit tests from the top level solution. +# Or navigate to a service folder or a scenario folder, +# such as dotnetv3/CloudWatch/Scenarios to build and run an interactive scenario with `dotnet run` +COPY . /dotnetv3 + RUN cd /dotnetv3 && dotnet build -CMD ["dotnet", "test", "--filter", "Category=Unit"] +CMD ["dotnet", "test", "dotnetv3", "--filter", "Category=Unit"] \ No newline at end of file