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.

Docker Benifits

  • Rapid integration and build up
  • Isolation
  • Open source
  • Testability and reproducibility
  • Lightweight
  • Standardization
  • Scalable
  • Upgrading / downgrading / application versions
  • Security
  • 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.

Vagrant Benifits

  • Development environments
  • Simple bootstraping
  • Provisioning
  • Synced folders
  • Reproducible
  • ssh
  • Very flexible

Docker drawbacks

  • New versions == broken features
  • Moves quickly
  • Documentation not always in sync
  • Unreliable networking

Vagrant Drawbacks

  • Can become v complex w prod. provisioner (Salt, etc.)
  • Multiple VMs quickly eat up disk space
  • Development environment that kills your battery