27ed26e141
Co-authored-by: rlander@microsoft.com <Rich Lander> Co-authored-by: Logan Bussell <loganbussell@microsoft.com> Co-authored-by: Matt Thalman <mthalman@microsoft.com> |
||
---|---|---|
.. | ||
aspnetapp | ||
complexapp | ||
dotnetapp | ||
globalapp | ||
kubernetes | ||
releasesapi | ||
releasesapp | ||
snippets | ||
Directory.Build.props | ||
README.md | ||
build-for-a-platform.md | ||
build-in-sdk-container.md | ||
deploy-container-to-aci.md | ||
enable-globalization.md | ||
establishing-docker-environment.md | ||
host-aspnetcore-https.md | ||
push-image-to-acr.md | ||
push-image-to-dockerhub.md | ||
run-aspnetcore-https-development.md | ||
run-in-sdk-container.md | ||
run-tests-in-sdk-container.md | ||
selecting-tags.md |
README.md
.NET container samples
The following samples and guidance demonstrate how to use .NET and Docker for development, testing and production. You can use the samples for learning about containers or as the basis of your own container images.
Kubernetes samples are provided in the kubernetes directory.
Note: Samples ports and users are changing, with .NET 8
Breaking change: dotnet/samples port and user changing
Building images
- Build a .NET container image
- Build an ASP.NET Core container image
- Build a single file app
- Build a native AOT app
- Building a globalization and time zone aware (or unaware) image
- Build for a platform
Development guidance
- Selecting .NET image tags
- Enable (or disable) globalization
- Build and test a multi-project solution
- Run test in a container
- Build in an SDK container
- Run applications in an SDK container
- Run ASP.NET Core Applications in development with container and HTTPS
- Discover licensing for Linux image contents
Hosting guidance
- Host ASP.NET Core Images with container and HTTPS
- Push container images to Azure Container Registry
- Push container images to Docker Hub
- Deploy ASP.NET Core Applications to Azure Container Instances
Other documentation
- Introduction to .NET and Docker
- Announcing built-in container support for the .NET SDK
- Staying safe in containers
- Improving multi-platform container support
- Container blog posts
Try pre-built images
The following commands will run a .NET console app in a container:
docker run --rm mcr.microsoft.com/dotnet/samples
The following command will run an ASP.NET Core console app in a container that you can access in your web browser at http://localhost:8000
.
docker run --rm -it -p 8000:8080 mcr.microsoft.com/dotnet/samples:aspnetapp
Docker Repositories
You can find .NET container images at the following Docker repositories:
- dotnet: .NET
- dotnet/framework: .NET Framework