msimons/dotnet

By msimons

Updated over 6 years ago

sandbox

Image
0

10K+

Featured Repos

.NET Core

.NET Framework

About .NET Core

.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, gaming, and IoT.

.NET has several capabilities that make development easier, including a automatic memory management, (runtime) generic types, reflection, asynchrony, concurrency, and native interop. Millions of developers take advantage of these capabilities to efficiently build high-quality applications.

You can use C# to write .NET Core apps. C# is simple, powerful, type-safe, and object-oriented while retaining the expressiveness and elegance of C-style languages. Anyone familiar with C and similar languages will find it straightforward to write in C#.

Different .NET implementations handle the heavy lifting for you:

  • .NET Core is an open source cross-platform .NET implementation for websites, servers, and console apps on Windows, Linux, and macOS.
  • The .NET Framework supports websites, services, desktop apps, and more on Windows.

Choosing between .NET Core and .NET Framework for server apps

Watch dotnet/announcements for Docker-related .NET announcements.

How to Use the Images

.NET Core

The .NET Core Docker samples show various ways to use .NET Core and Docker together. See Building Docker Images for .NET Core Applications to learn more.

Container sample: Run a simple application

You can quickly run a container with a pre-built .NET Core Docker image, based on the .NET Core console sample.

Type the following command to run a sample console application:

docker run --rm mcr.microsoft.com/dotnet/core/samples
Container sample: Run a web application

You can quickly run a container with a pre-built .NET Core Docker image, based on the ASP.NET Core sample.

Type the following command to run a sample web application:

docker run -it --rm -p 8000:80 --name aspnetcore_sample mcr.microsoft.com/dotnet/core/samples:aspnetapp

After the application starts, navigate to http://localhost:8000 in your web browser. On Windows, you may need to navigate to the container via IP address. See ASP.NET Core apps in Windows Containers for instructions on determining the IP address, using the value of --name that you used in docker run.

See Hosting ASP.NET Core Images with Docker over HTTPS to use HTTPS with this image.

.NET Framework

The .NET Framework Docker samples show various ways to use .NET Framework and Docker together. See Building Docker Images for .NET Framework Applications to learn more.

Container sample: Run a simple application

Type the following command to run a sample console application:

docker run --rm mcr.microsoft.com/dotnet/framework/samples:dotnetapp
Container sample: Run a web application

Type the following command to run a sample web application:

docker run -it --rm -p 8000:80 --name aspnet_sample mcr.microsoft.com/dotnet/framework/samples:aspnetapp

After the application starts, navigate to http://localhost:8000 in your web browser. You need to navigate to the application via IP address instead of localhost for earlier Windows versions, which is demonstrated in View the ASP.NET app in a running container on Windows.

Docker Pull Command

docker pull msimons/dotnet