Containers
Both .NET and Python have a standard container technology called Docker. Docker provides a platform for developers to package their applications and all their dependencies into a single container, making it easy to deploy and run their applications consistently across different environments.
Building Docker Containers for .NET Applications
When you add the Nuget package to an application, it adds a file called Dockerfile.sample in the NugetContent folder.

This sample provides a starting point to construct a Docker container image.
The Dockerfile uses alpine as the base image and then creates a build image on top of it. The build image is used to restore/build the project.