VMs vs. Docker
For many years after completing my military training, I had to operate with virtual machines. It was all that was available for system isolation. Then a friend told me about Docker, and I was like, "what?" So I looked into it and have so appreciated its advances and improvements.
So why would you install a virtual machine or Docker container? There are a couple reasons. When I used virtual machines, I did is so that I didn't have to install and maintain software on my main computer. Installing software also makes the computer you install it on more vulnerable to viruses and attacks. Virtual machines are computers installed on another computer. You install the entire operating system within the "host" system. Then on this "guest" system you can install whatever software you want. In order to access it, you have to turn on the host system, then "turn on" the guest system and access it just like you access the host. I'll explain more of the differences later.
Below is an diagram for the difference between Docker containers and virtual machines. Virtual machines come with a LOT more overhead. You have to install the entire operating system kernel and all drivers and software. Docker containers on the other hand use the host systems kernel and OS files. With Docker you can install just the software that is required for the application you are working on. It's very similar to installing the software on the host computer itself, but it comes with the benefit of system isolation which helps with security. And since it doesn't require the operating system, MUCH smaller footprint and overhead.

This paradigm drastically improves the potential and ability to self-host different software. With the lighter weight Docker containers you don't have to have such a beefy computer to host things on.