github.com/anchore/syft@v1.38.2/syft/pkg/cataloger/dotnet/test-fixtures/image-net8-compile-target/Dockerfile (about)

     1  FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine@sha256:3f93439f47fea888d94e6e228d0d0de841f4122ef46f8bfd04f8bd78cbce7ddb AS build
     2  ARG RUNTIME=win-x64
     3  WORKDIR /src
     4  
     5  COPY src/helloworld.csproj .
     6  RUN dotnet restore -r $RUNTIME
     7  
     8  COPY src/*.cs .
     9  RUN dotnet publish -c Release -r $RUNTIME --self-contained false -o /app
    10  
    11  # note: we're not using a runtime here to make testing easier... so you cannot run this container and expect it to work
    12  # we do this to keep the test assertions small since the don't want to include the several other runtime packages
    13  FROM busybox:latest
    14  
    15  WORKDIR /app
    16  
    17  COPY --from=build /app .