Docker as mentioned above is great especially if you're going down the homelab rabbit hole. You'll find it really useful to get familiar with for future projects.
Another alternative is to install DietPi. It's an operating system for a raspberry pi. It has all these programs you mentioned with install scripts including docker and installing (and updating) is as easy as checking a box. Also has a pretty good community in case you run into an edge case.