github.com/anchore/syft@v1.38.2/syft/pkg/cataloger/dotnet/test-fixtures/image-net8-app/Dockerfile (about) 1 # This represents a basic .NET project build where the project dependencies are downloaded and the project is built. 2 # The output is a directory tree of DLLs, a project.lock.json (not used in these tests), a .deps.json file, and 3 # a .runtimeconfig.json file (not used in these tests). With this deployment strategy there is no bundled runtime. 4 FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:8.0-alpine@sha256:7d3a75ca5c8ac4679908ef7a2591b9bc257c62bd530167de32bba105148bb7be AS build 5 ARG RUNTIME=win-x64 6 WORKDIR /src 7 8 # copy csproj and restore as distinct layers 9 COPY src/*.csproj . 10 COPY src/packages.lock.json . 11 RUN dotnet restore -r $RUNTIME --verbosity normal --locked-mode 12 13 # copy and publish app and libraries 14 COPY src/ . 15 RUN dotnet publish -r $RUNTIME --no-restore -o /app 16 17 # $ dotnet list package --include-transitive 18 # Project 'dotnetapp' has the following package references 19 # [net8.0]: 20 # Top-level Package Requested Resolved 21 # > Humanizer 2.14.1 2.14.1 22 # > Newtonsoft.Json 13.0.3 13.0.3 23 # 24 # Transitive Package Resolved 25 # > Humanizer.Core 2.14.1 26 # > Humanizer.Core.af 2.14.1 27 # > Humanizer.Core.ar 2.14.1 28 # > Humanizer.Core.az 2.14.1 29 # > Humanizer.Core.bg 2.14.1 30 # > Humanizer.Core.bn-BD 2.14.1 31 # > Humanizer.Core.cs 2.14.1 32 # > Humanizer.Core.da 2.14.1 33 # > Humanizer.Core.de 2.14.1 34 # > Humanizer.Core.el 2.14.1 35 # > Humanizer.Core.es 2.14.1 36 # > Humanizer.Core.fa 2.14.1 37 # > Humanizer.Core.fi-FI 2.14.1 38 # > Humanizer.Core.fr 2.14.1 39 # > Humanizer.Core.fr-BE 2.14.1 40 # > Humanizer.Core.he 2.14.1 41 # > Humanizer.Core.hr 2.14.1 42 # > Humanizer.Core.hu 2.14.1 43 # > Humanizer.Core.hy 2.14.1 44 # > Humanizer.Core.id 2.14.1 45 # > Humanizer.Core.is 2.14.1 46 # > Humanizer.Core.it 2.14.1 47 # > Humanizer.Core.ja 2.14.1 48 # > Humanizer.Core.ko-KR 2.14.1 49 # > Humanizer.Core.ku 2.14.1 50 # > Humanizer.Core.lv 2.14.1 51 # > Humanizer.Core.ms-MY 2.14.1 52 # > Humanizer.Core.mt 2.14.1 53 # > Humanizer.Core.nb 2.14.1 54 # > Humanizer.Core.nb-NO 2.14.1 55 # > Humanizer.Core.nl 2.14.1 56 # > Humanizer.Core.pl 2.14.1 57 # > Humanizer.Core.pt 2.14.1 58 # > Humanizer.Core.ro 2.14.1 59 # > Humanizer.Core.ru 2.14.1 60 # > Humanizer.Core.sk 2.14.1 61 # > Humanizer.Core.sl 2.14.1 62 # > Humanizer.Core.sr 2.14.1 63 # > Humanizer.Core.sr-Latn 2.14.1 64 # > Humanizer.Core.sv 2.14.1 65 # > Humanizer.Core.th-TH 2.14.1 66 # > Humanizer.Core.tr 2.14.1 67 # > Humanizer.Core.uk 2.14.1 68 # > Humanizer.Core.uz-Cyrl-UZ 2.14.1 69 # > Humanizer.Core.uz-Latn-UZ 2.14.1 70 # > Humanizer.Core.vi 2.14.1 71 # > Humanizer.Core.zh-CN 2.14.1 72 # > Humanizer.Core.zh-Hans 2.14.1 73 # > Humanizer.Core.zh-Hant 2.14.1 74 75 # lets pull in a file that is not related at all and in fact is not a .NET binary either (this should be ignored) 76 RUN wget -O /app/jruby_windows_9_3_15_0.exe https://s3.amazonaws.com/jruby.org/downloads/9.3.15.0/jruby_windows_9_3_15_0.exe 77 78 FROM busybox 79 WORKDIR /app 80 COPY --from=build /app . 81 # just a nice to have for later... 82 #COPY --from=build /src/packages.lock.json .