Dockerfile for a .NET 9 Web API Application

Download full source code. Occasionally, I want to build and run a .NET application within a Docker container. I use VS Code on Linux, so I don&rsquo;t have the easy option to add a Dockerfile that is in the full Visual Studio. And I can never remember exactly what to do, so here it is for my future reference. There are samples on the dotnet/dotnet-docker/ GitHub repo. But it feels a bit…