November 16th, 2016

Docker containers – Should I use .NET Core or .NET Framework?

Cesar De la Torre
Principal Program Manager

image

The short answer is: “For Docker containers, use .NET Core whenever is possible”. But, below is a summary decision table depending on your architecture or application type and the server operating system you are targeting for your Docker containers.

Take into account that if you are targeting Linux containers you will need Linux based Docker hosts (VMs or Servers) and in a similar way, if you are targeting Windows containers you will need Windows Server based Docker hosts (VMs or Servers).

Architecture / App Type Linux containers Windows containers
Microservices .NET Core .NET Core
Monolithic deployment App .NET Core .NET Framework

.NET Core

Best-in-class performance and scalability .NET Core .NET Core
Windows Server “brown-field” migration to containers .NET Framework
Containers “green-field” .NET Core .NET Core
ASP.NET Core .NET Core .NET Core recommended

.NET Framework is possible

ASP.NET 4 (MVC 5, Web API 2) .NET Framework
SignalR services .NET Core in upcoming releases .NET Framework

.NET Core in upcoming releases

WCF, WF and other traditional frameworks .NET Framework
Consumption of Azure services .NET Core

(Eventually all Azure services will provide Client SDKs for .NET Core)

.NET Framework

.NET Core

(Eventually all Azure services will provide Client SDKs for .NET Core)

And here’s a written summary about it:

You should use .NET Core for your containerized Docker server application when: •    You have cross-platform needs. You want to use Linux containers and Windows containers. •    Your application architecture is based on microservices. •    You need best-in-class high performance and hyper-scale.

You should use .NET Framework for your containerized Docker server application when: •    Your application currently uses .NET Framework and has strong dependencies on Windows •    You need to use third-party .NET libraries or NuGet packages not available for .NET Core. •    You need to use .NET technologies that are not available for .NET Core. •    You need to use a platform that doesn’t support .NET Core.

I’m writing further details about this subject in a separate and longer document, but I thought it would be good to share this summary table with the community and get some feedback. Please, post your feedback here in the blog post or send me direct feedback to cesardl at microsoft.com

Author

Cesar De la Torre
Principal Program Manager

Principal Program Manager at the Azure team.

0 comments

Discussion are closed.