Closed mathieu-benoit closed 1 month ago
Getting this error:
#11 0.878 Determining projects to restore...
#11 1.731 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.DotNet.ILCompiler with version (>= 9.0.0-rc.1.24421.1)
#11 1.731 /app/my-sample-app.csproj : error NU1102: - Found 53 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
#11 1.731 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 9.0.0-rc.1.24421.1)
#11 1.731 /app/my-sample-app.csproj : error NU1102: - Found 30 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
#11 1.732 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.linux-x64 with version (= 9.0.0-rc.1.24421.1)
#11 1.732 /app/my-sample-app.csproj : error NU1102: - Found 170 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
#11 1.732 /app/my-sample-app.csproj : error NU1102: Unable to find package runtime.linux-x64.Microsoft.DotNet.ILCompiler with version (= 9.0.0-rc.1.24421.1)
#11 1.732 /app/my-sample-app.csproj : error NU1102: - Found 53 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
#11 1.732 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.AspNetCore.App.Runtime.linux-x64 with version (= 9.0.0-rc.1.24416.6)
#11 1.732 /app/my-sample-app.csproj : error NU1102: - Found 170 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24406.2 ]
#11 1.762 Failed to restore /app/my-sample-app.csproj (in 564 ms).
#11 ERROR: process "/bin/sh -c dotnet restore my-sample-app.csproj -r linux-x64" did not complete successfully: exit code: 1
failed to solve: process "/bin/sh -c dotnet restore my-sample-app.csproj -r linux-x64" did not complete successfully: exit code: 1
------
> [my-sample-workload-my-sample-container builder 4/6] RUN dotnet restore my-sample-app.csproj -r linux-x64:
1.731 /app/my-sample-app.csproj : error NU1102: - Found 53 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
1.731 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.NET.ILLink.Tasks with version (>= 9.0.0-rc.1.24421.1)
1.731 /app/my-sample-app.csproj : error NU1102: - Found 30 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
1.732 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.linux-x64 with version (= 9.0.0-rc.1.24421.1)
1.732 /app/my-sample-app.csproj : error NU1102: - Found 170 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
1.732 /app/my-sample-app.csproj : error NU1102: Unable to find package runtime.linux-x64.Microsoft.DotNet.ILCompiler with version (= 9.0.0-rc.1.24421.1)
1.732 /app/my-sample-app.csproj : error NU1102: - Found 53 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24405.7 ]
1.732 /app/my-sample-app.csproj : error NU1102: Unable to find package Microsoft.AspNetCore.App.Runtime.linux-x64 with version (= 9.0.0-rc.1.24416.6)
1.732 /app/my-sample-app.csproj : error NU1102: - Found 170 version(s) in nuget.org [ Nearest version: 9.0.0-preview.7.24406.2 ]
1.762 Failed to restore /app/my-sample-app.csproj (in 564 ms).
RC-1 is not yet official, so let's use Preview-7 for now?
RC 1 is now official: https://devblogs.microsoft.com/dotnet/dotnet-9-release-candidate-1-is-now-available/, fixing the previous issue.
Deployment ID: 17f453a59a51a9e3
my-sample-workload: helloworld-preview.endpoints.mathieu-benoit-gcp.cloud.goog
.NET 9 RC 1 is out https://devblogs.microsoft.com/dotnet/dotnet-9-release-candidate-1-is-now-available/. You can also find information about the performance improvements in .NET 9: https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-9/.
Couple of notes below with some comparisons between .NET 9 and .NET 8, in terms of
distroless
container images, focused on thedotnet-runtime-deps
(for self-contained or AOT apps):-noble-chiseled-aot
and-azurelinux3.0-distroless-aot
are still not officially supported in the GA registry, so I'm still using thePreview/Nightly
registry.-jammy-chiseled
(Ubuntu 22.04) is not anymore supported but-noble-chiseled
(Ubuntu 24.04) is still supported.-azurelinux3.0-distroless
is still supported.-cbl-mariner2.0-distroless
is not anymore supported. Actually, the new name ofcbl-mariner
is nowazurelinux
.ubi8-minimal
. Anddotnet/runtime-deps
is still not supported there.dotnet/runtime-deps
is still not supported there.dotnet/runtime-deps
is still not supported there.--> tl,dr: I'm still using
-noble-chiseled-aot
but I'm really wondering if I should switch to-azurelinux3.0-distroless-aot
.<--Container images sizes
--> 0.3MB on disk have been saved for the
-noble-chiseled-aot
and-azurelinux3.0-distroless-aot
while just 0.1MB has been saved for the-noble-chiseled
and-azurelinux3.0-distroless
<--In terms of comparing the size between the images, here is the list from the smaller to the bigger in this list:
mcr.microsoft.com/dotnet/nightly/runtime-deps:9.0.0-rc.1-noble-chiseled-aot
: 11.6MBmcr.microsoft.com/dotnet/runtime-deps:9.0.0-rc.1-azurelinux3.0-distroless-aot
: 21.4MBcgr.dev/chainguard/dotnet-runtime
: 133MBregistry.access.redhat.com/ubi8/dotnet-80-runtime
: 234MBregistry.suse.com/bci/dotnet-runtime
: 244MBList of packages
syft mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0.8-noble-chiseled-aot
:syft mcr.microsoft.com/dotnet/nightly/runtime-deps:9.0.0-rc.1-noble-chiseled-aot
:--> 1 package has been removed:
zlib1g
for the-noble-chiseled-aot
<--syft mcr.microsoft.com/dotnet/runtime-deps:8.0.8-noble-chiseled
:syft mcr.microsoft.com/dotnet/runtime-deps:9.0.0-rc.1-noble-chiseled
:--> 1 package has been removed:
zlib1g
for the-noble-chiseled
<--syft mcr.microsoft.com/dotnet/runtime-deps:8.0.8-azurelinux3.0-distroless
:syft mcr.microsoft.com/dotnet/runtime-deps:9.0.0-rc.1-azurelinux3.0-distroless
:1 package has been removed:
zlib
for the-azurelinux3.0-distroless
<--syft mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0.8-azurelinux3.0-distroless-aot
:syft mcr.microsoft.com/dotnet/nightly/runtime-deps:9.0.0-rc.1-azurelinux3.0-distroless-aot
:2 packages have been removed:
zlib
for the-azurelinux3.0-distroless-aot
<--syft registry.access.redhat.com/ubi8/dotnet-80-runtime
:syft cgr.dev/chainguard/dotnet-runtime
:syft registry.suse.com/bci/dotnet-runtime:8.0
:Current CVEs (as of 2024-09-13)
trivy image mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0.8-noble-chiseled-aot
:trivy image mcr.microsoft.com/dotnet/nightly/runtime-deps:9.0.0-rc.1-noble-chiseled-aot
:trivy image mcr.microsoft.com/dotnet/runtime-deps:9.0.0-rc.1-azurelinux3.0-distroless
:trivy image mcr.microsoft.com/dotnet/runtime-deps:8.0.8-azurelinux3.0-distroless
:trivy image registry.access.redhat.com/ubi8/dotnet-80-runtime
:trivy image cgr.dev/chainguard/dotnet-runtime
:trivy image registry.suse.com/bci/dotnet-runtime:8.0
:-->
mcr.microsoft.com/dotnet/nightly/runtime-deps:9.0.0-rc.1-noble-chiseled-aot
has 5 CVEs (1 LOW and 4 MEDIUM) whilechainguard/dotnet-runtime
,-azurelinux3.0-distroless
andregistry.suse.com/bci/dotnet-runtime
have 0 CVEs, that's their strength, that's for sure.registry.access.redhat.com/ubi8/dotnet-80-runtime
has 88 CVEs though. <--Conclusion
I'm still using
-noble-chiseled-aot
but I'm really wondering if I should switch to-azurelinux3.0-distroless-aot
, for different reasons:dotnet/runtime-deps
(for self-contained or AOT apps);-noble-chiseled-aot
and 11 for-azurelinux3.0-distroless-aot
;-noble-chiseled-aot
and 21.4MB for-azurelinux3.0-distroless-aot
(just 9.8MB between both, that's nothing);-noble-chiseled-aot
has 5 CVEs (1LOW
and 4MEDIUM
) whilechainguard/dotnet-runtime
,-azurelinux3.0-distroless
,-azurelinux3.0-distroless-aot
andregistry.suse.com/bci/dotnet-runtime
have 0 CVEs.With all of that being said, and knowing that both are the two official
distroless
of the .NET container images, I think-azurelinux3.0-distroless-aot
is the most appealing here. That's why I think I will soon move to-azurelinux3.0-distroless-aot
from-noble-chiseled-aot
.