From 9700b1015c2c4b798dffa698bf89ee6d15a4436a Mon Sep 17 00:00:00 2001 From: David Sungaila Date: Wed, 3 Jul 2024 11:03:52 +0200 Subject: [PATCH] Test dockerfile --- src/FrameworkTests/AotConsole/Program.cs | 1 + src/Tests/Dockerfiles/linux | 3 +-- src/Tests/Dockerfiles/windows | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/FrameworkTests/AotConsole/Program.cs b/src/FrameworkTests/AotConsole/Program.cs index 43ef85a7..06e8e72b 100644 --- a/src/FrameworkTests/AotConsole/Program.cs +++ b/src/FrameworkTests/AotConsole/Program.cs @@ -7,6 +7,7 @@ public class Program public static void Main() { + throw new NotImplementedException(); Directory.SetCurrentDirectory(Path.GetDirectoryName(AppContext.BaseDirectory)!); using var input = new FileStream("SocialPreview.pdf", FileMode.Open, FileAccess.Read); using var bitmap = PDFtoImage.Conversion.ToImage(input); diff --git a/src/Tests/Dockerfiles/linux b/src/Tests/Dockerfiles/linux index b06c55af..2d99da54 100644 --- a/src/Tests/Dockerfiles/linux +++ b/src/Tests/Dockerfiles/linux @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS base +FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.20 AS base WORKDIR /app FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build @@ -17,7 +17,6 @@ ARG BUILD_CONFIGURATION=Release RUN dotnet publish "./Tests/Tests.csproj" -c $BUILD_CONFIGURATION -o /app/publish --no-restore -f $TARGET_FRAMEWORK FROM base AS final -ARG TARGET_FRAMEWORK=net8.0 WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "test", "publish/PDFtoImage.Tests.dll", "/logger:console;verbosity=detailed", "/logger:trx;verbosity=detailed"] \ No newline at end of file diff --git a/src/Tests/Dockerfiles/windows b/src/Tests/Dockerfiles/windows index 3c571ae1..9f08d7dc 100644 --- a/src/Tests/Dockerfiles/windows +++ b/src/Tests/Dockerfiles/windows @@ -17,7 +17,6 @@ ARG BUILD_CONFIGURATION=Release RUN dotnet publish "./Tests/Tests.csproj" -c $BUILD_CONFIGURATION -o /app/publish --no-restore -f $TARGET_FRAMEWORK FROM base AS final -ARG TARGET_FRAMEWORK=net8.0 WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "test", "publish/PDFtoImage.Tests.dll", "/logger:console;verbosity=detailed", "/logger:trx;verbosity=detailed"] \ No newline at end of file