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

     1  FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/core/sdk:2.2 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  
    10  RUN dotnet publish -c Release --no-restore -o /app
    11  
    12  FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/core/runtime:2.2
    13  WORKDIR /app
    14  COPY --from=build /app .
    15  
    16  # this is a realistic application image since the runtime is with the app
    17  ENTRYPOINT ["dotnet", "HelloWorld.dll"]