I recently tested Visual Studio Code Remote - Containers extension that lets you use a Docker container as a full-featured development environment.
https://code.visualstudio.com/docs/remote/containers
It works really well and Microsoft uses it in their guide for
Create and deploy a cloud-native ASP.NET Core microservice
https://docs.microsoft.com/en-us/training/modules/microservices-aspnet-core/2-deploy-application
This guide is in turn referenced from eShopOnContainers that is a sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers.
Is it possible to use this feature in Visual Studio 2022?
I know GitHub Codespaces can be used as well for this.