Emacs uses the same mechanism to work inside a container as it does to work over SSH, which is also the same mechanism it uses to work as a different user on the same machine, and pretty much anything you can get something FS/shell-like on. Multiple container runtimes, k8s clusters, git repositories, etc. It's essentially a full VFS layer, although (like most VFS layers) it's clunky if you try to compose certain things. E.g. remote debugging isn't going to work on your HDFS cluster...
https://www.gnu.org/software/emacs/manual/html_node/tramp/in...
https://www.gnu.org/software/emacs/manual/html_node/tramp/Cu...