Choosing the Right ASP.NET Docker Image

There are a few things to consider when deciding what underlying execution environment you want to use for your ASP.NET application. For Linux, your choices are .NET Core and Mono. At the time of this writing, Mono is a more mature and fuller-featured framework, and more third-party NuGet packages support Mono than .NET Core. That said .NET Core is quickly catching up in terms of feature parity, and with Mono you lose .NET Core’s benefits, like side-by-side support. This becomes less of an issue for containers as each Dockerfile could include a different Mono runtime and you can have multiple containers, each with different versions of the Mono framework installed on the same Docker host.

The common recommendation for Linux is that .NET Core is the better choice in the longer term and that Mono, in general, isn’t the best option for production environments because of the lack of full .NET framework parity, and the energy and investments currently being made in .NET Core.

For Windows, there are a couple of considerations. The first is whether to run on Windows Nano Server or full Windows Server. While most developers are familiar with Windows Server, Nano Server is a new headless, remotely managed version of Windows Server that has been dramatically trimmed down, resulting in better resource utilization, tighter security, and a smaller overall footprint. It includes a number of benefits like a much smaller size, 80 percent fewer reboots, and improved security. If you are running on Windows Nano Server, you must target .NET Core because the full .NET Framework isn’t supported.

For developers migrating existing applications to ASP.NET Core 1.0, the first thing you’ll want to check is whether the NuGet packages you depend on have a compatible version that runs on .NET Core. Every NuGet package you depend on needs to explicitly target .NET Core. For new ASP.NET applications, .NET Core is a simpler, lightweight solution, and in general is the recommended approach for the future. Table A.1 summarizes the different runtime and operating system choices for ASP.NET.

Image

TABLE A.1: Runtime and Operating System Options for ASP.NET

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.74.25