Summarising the difference between Docker, Boot2Docker and Vagrant
Short answer:Vagrant abstracts the machine where as Docker abstracts the application.
Vagrant is a virtual machine manager, it allows you to script the virtual machine configuration as well as the provisioning
Docker on the other hand uses kernel cgroup and namespacing via lxc.
It means that you are using the same kernel as the host and the same file system
The reason you could want to use Vagrant is if you need an operating environment which differs from that of your Virtualisation host.
e.g. You might want BSD, Windows or other non-linux development on your Ubuntu box
This Quora article explains it all quite well:
Conversely, you may use Vagrant to provision machines which have nothing to do with developing your application - for example a ready-to-use Windows box or something
Running Java inside a Windows container on a Windows server