The main benefit that Docker containers provide is encapsulation and consistency/reproducibility. The farmOS image contains all the dependencies (Apache, PHP, GEOS, BCMath), in the correct versions that we know work, pre-configured for farmOS.
This keeps your server itself “clean” in the sense that you don’t need to install anything other than Docker on it, which is handy if you need to move to another server (because of a crash, major upgrade, etc etc). The Docker container will run the same on any server with Docker.
My understanding is that Docker is different from a VM in that it is just a thin layer between the host system resources (CPU, RAM, etc) and that code running in the container. It is not emulating an entire operating system. Therefore, the CPU and RAM usage of the container will be comparable to running farmOS outside of a container (maybe a little bit of overhead, but negligible).
Database and files are NOT stored in the Docker container itself (if you set up your volumes correctly). They are stored on the host server and mounted into the container as a volume/directory.
Another benefit is security: if a major security issue is discovered in Drupal or farmOS, and an attacker exploits it to gain access to your server, they are still inside the container and cannot access the host server itself (unless they also have a Docker exploit to break out), so there is an added layer.
It is especially useful for development. I can run the same Docker container on my laptop that I run on a server. So if I want to develop new features, I can copy a backup of my site down to my laptop, do development there, and I know that it will work the same on the production server.
The biggest disadvantage is that you have to learn and understand Docker. And that’s understandably a hurdle that doesn’t make sense for some! So if the benefits described above don’t outweigh that extra layer, then stick with what you’re familiar with!
There have been a number of people who have reported issues with missing dependencies when they install farmOS outside of Docker (usually on shared hosting where they don’t have the ability to install things like GEOS). But, if you do have full server access, you can also look to the farmOS
Dockerfile to see exactly what you need! It is just a series of steps that set up the server (container) with what farmOS needs to run.