It would log into the remote machine using Expect, then it would send a command to the remote end that tested whether a home directory already existed. If so, it spawned a new shell in it. Otherwise it created a "home directory" in /tmp, pulled a tarball from a server, and extracted it into the "home directory". Then it spawned a new shell there.
Depending on how often it happens, you could also have a separate command that does the initial setup, and then call that as required.
That's a bit naughty but sometimes needed to prove something useful.
In that case you've got an effemeral file system, and probably had to install Vim in the first place, knowing that that when you close the container all will be forgotten.
Ofcourse in that situation you probably don't need to disable the Vim swap files, so that's one less thing to changet the defaults on.
I often use Busybox for that kind of thing as you're usually missing other useful OS stuff and its little Vi clone is usually enough.
echo 'set keywordprg=:help' >> ~/.vimrc
:)