- .NET developers are now able to install the ASP.NET and .NET SDK and runtimes from Ubuntu 22.04 LTS with a single “apt install” command
- Canonical releases new, ultra-small OCI-compliant appliance images, without a shell or package manager, for both the .NET 6 LTS and ASP.NET runtimes
- Microsoft and Canonical are collaborating to secure the software supply chain between .NET and Ubuntu and to provide enterprise-grade support
Canonical is proud to welcome the .NET development platform, one of Microsoft’s earliest contributions to open source projects, as a native experience on Ubuntu hosts and container images, starting in Ubuntu 22.04 LTS.
.NET developers will be able to start their Linux journey with Ubuntu, benefiting from timely security patches and new releases.
.NET 6 users and developers can now install the .NET 6 packages on Ubuntu with a simple
apt install dotnet6 command. Optimised, pre-built, ultra-small container images are also now available to use out of the box.
.NET as an Ubuntu .deb package is the result of a close collaboration between Microsoft and Canonical. The two companies are working together to deliver timely security patches and new releases to Ubuntu. This is the foundation for more capabilities to follow for the open-source framework on Ubuntu, for hosts and minimised container images.
“Working with Canonical has enabled us to simultaneously deliver ease of use and improved security to .NET developers,” said Richard Lander, Program Manager, .NET. “The project benefits from Canonical’s leadership in the Linux ecosystem, and from Microsoft’s depth of experience on dev tools and platforms. The result is a combination of in-box packages and container images that will benefit community developers and large Enterprise customers alike through open source.”
“Ubuntu now has an end-to-end story from development to production with ultra-small supported container images, starting with the .NET platform”, said Valentin Viennot, Product Manager, Canonical. “We think it’s a huge improvement for both our communities; collaborating with the .NET team at Microsoft has enabled us to go above and beyond”.
Install .NET 6 on Ubuntu
With this new addition to Canonical’s repositories, installing and keeping .NET and ASP.NET up to date on Ubuntu 22.04 LTS is straightforward:
# 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
Microsoft and Canonical: partnering for security
Software provenance is more critical than ever to all open source consumers. Open-source communities and enterprises both need to be confident in their software dependencies.
Canonical and Microsoft have worked together to share content with each other directly, with no intermediaries. “We now have what’s effectively a zero-distance supply chain for all Canonical assets”, said Richard Lander, .NET Program Manager at Microsoft.
Microsoft recently set up a distro maintainer group for .NET. Canonical is now a member of that group, contributing to secure the software supply chain, from source to packages.
Canonical’s software repositories continue to expand. Over 28,000 packages are already available to date, with exclusive and extended security patching for Ubuntu Pro and Ubuntu Advantage subscribers, as well as free community users.
Timely security patches and releases
.NET and Ubuntu’s long-term supported (LTS) releases take place in different years but are perfectly aligned. The .NET LTS ships in November of odd years and the Ubuntu LTS ships in April of the following even year.
As a result, Ubuntu users will always have a fresh new .NET LTS in each Ubuntu LTS series. This combination is the logical choice for developers and software vendors, combining two secure and stable product releases to form a trusted foundation for their applications. Microsoft and Canonical are committed to working together to make sure that new .NET releases are available with new Ubuntu releases, and that they work well together.
Establishing the shortest trust chain between Microsoft and Canonical has been critical to building this partnership. The result is a straightforward developer experience, and a regular steam of security patches and updates.
Minimal OCI images: chiselling Ubuntu for .NET
The .NET development platform was one of Microsoft’s earliest contributions to open-source projects. Its developer community consists of more than 5 million .NET developers, with many adopting Linux and Linux-based OCI containers at runtime.
Ubuntu has been a popular choice for developers using containers since the first days of Docker. Alongside the launch of .NET on Ubuntu, Canonical is also offering a new type of container images, composing with only the strict set of packages and files required at runtime.
These “chiselled” images – so-called because everything not needed to provide a minimal Ubuntu image optimised for OCI containers has been cut away – address developer feedback around attack surface and image size, without sacrificing Ubuntu’s stability and familiarity.
So far, this process has cut 100MB away, delivering the smallest Ubuntu-based OCI image ever published at less than 6MB (compressed). Canonical’s goal is to deliver the smallest footprint ever achieved in an OCI image, while still providing known and trusted Ubuntu content.
Canonical has released into beta two new Ubuntu-based OCI images for .NET 6, maintained as part of the existing portfolio of LTS images:
- A 12.9MB (uncompressed) image with only the .NET runtime dependencies for self-contained .NET applications (shortening the supply chain between Canonical and Microsoft): hub.docker.com/r/ubuntu/dotnet-deps
- A 117MB (uncompressed) image, including the newly released .NET 6 runtime .deb package, installed from the official Ubuntu repositories: hub.docker.com/r/ubuntu/dotnet-runtime; and similarly for the ASP.NET runtime hub.docker.com/r/ubuntu/dotnet-aspnet
These first chiselled Ubuntu images for the .NET and ASP.NET runtimes are also available from Microsoft, from the Microsoft Artifact Registry (MCR).
This project is the first of a series of projects Canonical has planned for .NET and Ubuntu. Read more about this partnership on Microsoft’s blog.
.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 on all newer Ubuntu releases.
Pre-built container images are already available on the Azure Container Registry and on Docker Hub: