I was using TRAMP to do that in Emacs 20 years ago. These days I use emacs-server in the container and waypipe my frames.