.NET 6 is now available in Ubuntu 22.04 and Easy Ubuntu Containers, under a new partnership between Microsoft and Canonical


Microsoft and Canonical announced on Tuesday that a months-long partnership has resulted in the inclusion of .NET 6 in Ubuntu 22.04 (Jammy), meaning developers can start using .NET much faster on this Linux distribution. In addition, this partnership has also resulted in the availability of .NET 6 in a new type of lightweight and simplified container images created by Canonical called “Chiseled Ubuntu Containers”. Both companies have announced that .NET packages will be updated regularly, so developers won’t miss new features and fixes.

The inclusion of .NET 6 in Ubuntu means you can install the .NET 6 SDK much faster by simply entering apartment install dotnet6 in your terminal. Canonical has also released packages for ASP.NET Core (aspnet-runtime-6.0) and .NET Runtime (dotnet-runtime-6.0), which can be installed in the same way. This should give you easier access to the tools you need to start developing .NET applications on Linux. The company warns that Arm64 builds are not yet available, but both parties are working to release them as soon as possible.

Working with Canonical has allowed us to simultaneously deliver ease of use and improved security to .NET developers. The project benefits from Canonical’s leadership in the Linux ecosystem and Microsoft’s deep experience with developer tools and platforms. The result is a combination of bundled packages and container images that will benefit community developers and large enterprise customers alike through open source,” said Richard Lander, .NET program director at Microsoft. Installing and updating on Ubuntu 22.04 LTS is simple:

1
2
3
4
5
6

# quickly install a bundle with both the SDK and the runtime
sudo apt update && sudo apt install dotnet6
# or cherry-pick only the dependencies you need to develop or run
sudo apt install dotnet-sdk-6.0
sudo apt install dotnet-runtime-6.O
sudo apt install aspnetcore-runtime-6.0

In addition to being integrated into Ubuntu 22.04, Microsoft and Canonical also announced that .NET 6 packages are now available in Chiseled Ubuntu Containers. Cisel containers are a new approach to containers that allow you to minimize the size of a distribution by installing only the necessary paths and files in each package. In other words, Canonical uses the term "chiseling" to describe the process of removing all files and packages other than those strictly necessary to run the images.

These "chiseled" images - so called because anything not needed to provide a minimal Ubuntu image optimized for OCI containers [Open Container Initiative] has been removed - address developer feedback regarding attack surface and image size, without sacrificing Ubuntu stability and familiarity, Canonical said in a blog post on Tuesday. The company said the snipping resulted in the smallest Ubuntu-based OCI image ever released, coming in a compressed 6MB package that's been stripped of some 100MB of code.

The Ubuntu maker has released two new Ubuntu-based OCI beta images for .NET 6. The new container images are expected to significantly improve the security posture with:

  • ultra-small images (reduced size and attack surface);
  • no package manager (prevents a whole category of attacks);
  • no Shell (avoid a whole series of attacks);
  • non-root (quickly a whole class of attacks).

The partnership has two objectives: to simplify the use of .NET on Ubuntu and to shorten the supply chain between Canonical and Microsoft. The first goal was achieved with the inclusion of .NET 6 in Jammy. Regarding the second point, Microsoft said: Canonical already has secure processes in place to deliver Ubuntu VM images directly to Azure for customers to use. We thought Canonical could do the same with the base Ubuntu container images that we use to build Ubuntu-based .NET images (regular and chiseled).

That's what we use now, instead of tapping into Docker Hub. We now have what is effectively a zero distance supply chain for all Canonical assets with known custody/provenance throughout the chain,” Microsoft added. Canonical has announced that .NET deb packages are now in Ubuntu Jammy 22.04 LTS for the x64 architecture and will soon be available for the Arm64 architecture, as well as all new Ubuntu releases. The company has confirmed that prebuilt container images are available on Azure Container Registry and through Docker Hub.

Microsoft and Canonical continue to work together and aim to make new versions of .NET available with new versions of Ubuntu. So things should get better if you're a .NET developer who prefers Windows Linux. Also, if you want to start developing with .NET 7, you'll have to wait a bit longer, as Microsoft says packages won't be available until .NET 7 is generally available.

Source: Microsoft, Canonical

And you?

What is your opinion on the subject?
What do you think of the partnership between Microsoft and Canonical?
What do you think of Ubuntu's .NET support?
How could this improve the experience of .NET developers on Linux?

See as well

Microsoft announces .NET 6, the fastest release yet with support for Apple Silicon chips, process-isolated Windows containers, and improved file I/O

Ubuntu 22.04 LTS is now available, with Gnome 42 as the default desktop, it unlocks innovation for industries with security needs

Ubuntu Core 22 is now available, optimized for IoT and embedded devices, however, some feedback points to a difficult configuration

Microsoft Releases First Preview of .NET 7 with Continued JIT Compiler Optimizations, New APIs, and Support for More Hot Reload Scenarios

Leave a Comment