As far as I know, there is almost no situation when you would need a virtual machine, over docker. But maybe it can be required if you need to pretend that you have multiple physical separate machines. But those situations are very limited. One situation that I came through is when I was needed to emulate a multi-machine cluster of Kubernetes nodes in a single machine. But that situation is limited and very unique. I would suggest you should learn Docker or Kubernetes for better future in cloud computing. Here is a DevOps training Course which covers all these topics including some other topics such as Git, Jenkins, etc. I would also suggest you must read the following DevOps tutorial to understand it better. I am also mentioning an awesome video tutorial on Docker Kubernetes and DevOps which you can refer to learn these videos are free of cost.