When I first installed mastodon on my little Digital Ocean droplet, I believed that “a docker container is just a lightweight virtual machine”. Given how small my droplet was, I didn’t think it had enough room for any kind of VM, no matter how lightweight. I’ve since learned that docker containers are not virtual machines, though thats a useful approximation when you’re just getting started with them.
Anyway, there’s very very little performance difference between a native install and a container, and they’re much easier to work with.
Here’s my notes on the process of moving an existing installation to docker. Keep in mind this is a single-user instance and I don’t care about downtime.