The workshop details the fundamental workflows for using .NET with containers. It includes a variety of approaches and capabilities, such as OCI image publish, registry push, Dockerfile, cross-compilation, and chiseled containers. OCI publish is used as the default approach.
The instructions assume .NET SDK 8.0.200+. See .NET SDK version differences to compare with .NET SDK 8.0.1xx.
Instructions:
- Publish OCI images
- ASP.NET Core web apps
- Target Alpine
- Target Ubuntu Chiseled
- .NET SDK Publish Option
- Troubleshooting
Advanced instructions:
- Publish OCI image publishing reference
- Dockerfile samples
- Publishing apps within an SDK container
- Cross-compilation
- Publishing to a registry
- Controlling how your containers run
- Dynamically Adapting To Application Sizes
If you are using this repo in a talk, use this QR code to help people find the repo.
![QR code to repo](https://private-user-images.githubusercontent.com/2608468/282267902-4067d47d-5ea3-460e-9062-0050c611ba53.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTMxODMsIm5iZiI6MTczOTI1Mjg4MywicGF0aCI6Ii8yNjA4NDY4LzI4MjI2NzkwMi00MDY3ZDQ3ZC01ZWEzLTQ2MGUtOTA2Mi0wMDUwYzYxMWJhNTMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMDU0ODAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDM0NGY1YjA2MGI0ZDc0YWU2YmI3MDRlODZlNzJmMzYxNjVhYjliOTQxNmNiYjhkYWI3MmJiZWM0MWRiMGE4YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.rNLUs7xq4A8hOoHgLVOTsaTeT7A64-zUfUZH9HdoIKg)
The instructions assume:
The following environment was used for the examples.
$ dotnet --version
8.0.201
$ docker --version
Docker version 24.0.5, build 24.0.5-0ubuntu1
$ uname -a
Linux mazama 6.5.0-21-generic #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:17:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux