2 Managing Infrastructure Components With Containers and Integrations
This chapter covers
- The fundamentals of Docker containers.
- Integrating a Keycloak Docker container with .NET Aspire to enable SSO security.
- Understanding .NET Aspire integrations and their benefits over raw Docker containers.
- Adding a pre-built .NET Aspire integration for Redis to an application.
- Building a custom .NET Aspire integration library from scratch.
In a real-life enterprise-grade application, services need to be connected to various infrastructure components, such as databases, message brokers, etc.. In this chapter, we will discuss two ways infrastructure components can be wired up in a .NET Aspire application:
- By using Docker containers
- Via the .NET Aspire integration libraries
In order to be able to follow this chapter, you would need to know what Docker containers are. So, this is what we will look at first.
2.1 Docker containers overview
Docker is a technology that allows executable applications to be isolated into so-called containers. This technology is covered in detail in a great book by Jeff Nickoloff called “Docker in Action”. Here is an overview of what this technology is.