I'm opinionated in regard to VMs. I don't use VMs because I have enough barebone machines available. The Elasticsearch JVM is already a kind of a VM. So just use VMs if you have to. If you want the best ratio of performance in relation to the the invested money into hardware, VMs are not a good choice. Because hardware is so cheap, people stop caring and use VMs - it's their decision which might be economic, but not the best for folks like me who care for optimal performance, tuning, and maximum resource utilization.
Docker containerization takes the burden from the developer how to manage development/test/production environments for deploying software to anywhere from laptop to the cloud. So the container encapsulates all what is required to run a specific Elasticsearch setup.
So in the end there is no exact answer. Try and measure for yourself. You know best what you expect from the system, maybe a certain number of documents indexed per timeframe, queries per second, whatever. Elasticsearch helps you because it scales horizontally over the number of machines, by just starting another node. You can combine all the different VMs you want to examine with and without Docker for test runs, and if the key indicators you want to see match your expectations, then you should go for that.