The difference between Docker and Vagrant is as follows:-
Vagrant is very simple but more resource-intensive as it is a whole package containing your web app and libraries on top of a guest OS in a virtual machine. You can have multiple virtual machines on a host OS.
Whereas, Docker is more optimized from a resource perspective as it uses “container” to manage your web app and its libraries. You can have multiple containers on one shared host OS thus reducing redundancy and overhead of multiple guest OS in the case of Vagrant.
Docker uses the Docker Engine to isolate application processes in different containers on a host OS. Vagrant uses a separate guest OS to isolate application processes. In the current IT world where everyone is shifting their products to the cloud you must learn Docker. Here is a video tutorial on Docker which you must watch to learn more about it. .