Skip to content

Commit

Permalink
Test dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sungaila committed Jul 3, 2024
1 parent a885b27 commit 9700b10
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/FrameworkTests/AotConsole/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/Tests/Dockerfiles/linux
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]
1 change: 0 additions & 1 deletion src/Tests/Dockerfiles/windows
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 9700b10

Please sign in to comment.