Replicate vim -> ipython workflow with local editor and remote kernel in docker

I got a lot of mileage from a very basic workflow where I edited text in vim, switched tmux panes into ipython and then pasted and executed the code (REPL).

I am now working with data on a remote EC2 instance inside of a docker container. It seems like there could be a way to replicate my old work flow in the new setup with a few more pieces of the jupyter ecosystem. I envision the only difference from the user side being that I would have to start jupyter-<something> inside of docker, and specify how to connect my local jupyter-<something in a terminal> to it.

Are there any suggestions for how to make this work?