Suprisingly when looking at Docker and Vagrant you're comparing apples to oranges. While similar they're not directly comparable because they have slightly different intended purposes and benefits. One is lighter and the other is more robust.
What is Docker?
Docker allows for easily creating lightweight, portable, self-sufficient containers from just about any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.
- Rapid integration and build up
- Open source
- Testability and reproducibility
- Upgrading / downgrading / application versions
- Private paas environments
What is Vagrant?
Vagrant on the other hand provides a framework and configuration format for creat and manage complete portable development environments. These development environments can live on your computer or in the cloud, and are portable between Windows, Mac OS X, and Linux.
- Development environments
- Simple bootstraping
- Synced folders
- Very flexible
- New versions == broken features
- Moves quickly
- Documentation not always in sync
- Unreliable networking
- Can become v complex w prod. provisioner (Salt, etc.)
- Multiple VMs quickly eat up disk space
- Development environment that kills your battery