VS Code has support for Remote Containers. It allows the user to open any folder on their system in a docker container. I use this frequently for python development to ensure my development environment is always consistent. VS Code sends my python code to the Python Interactive Window and it is executed in the container's environment. This has huge and obvious benefits for dependency management.
Is something like this similar in RStudio? I would essentially like to replace the RStudio console with a console opened from within a Docker Container. Sending code to the console would then execute in the Container environment.