Need advice about which tool to choose?Ask the StackShare community!
Docker vs Vagrant: What are the differences?
What is Docker? Enterprise Container Platform for High-Velocity Innovation. The Docker Platform is the industry-leading container platform for continuous, high-velocity innovation, enabling organizations to seamlessly build and share any application — from legacy to what comes next — and securely run them anywhere.
What is Vagrant? A tool for building and distributing development environments. Vagrant provides the framework and configuration format to create 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.
Docker and Vagrant are primarily classified as "Virtual Machine Platforms & Containers" and "Virtual Machine Management" tools respectively.
Some of the features offered by Docker are:
- Integrated developer tools
- open, portable images
- shareable, reusable apps
On the other hand, Vagrant provides the following key features:
- Boxes
- Up And SSH
- Synced Folders
"Rapid integration and build up", "Isolation" and "Open source" are the key factors why developers consider Docker; whereas "Development environments", "Simple bootstraping" and "Free" are the primary reasons why Vagrant is favored.
Docker and Vagrant are both open source tools. Docker with 54K GitHub stars and 15.6K forks on GitHub appears to be more popular than Vagrant with 18.6K GitHub stars and 3.74K GitHub forks.
According to the StackShare community, Docker has a broader approval, being mentioned in 3524 company stacks & 3443 developers stacks; compared to Vagrant, which is listed in 802 company stacks and 478 developer stacks.
lxd/lxc and Docker aren't congruent so this comparison needs a more detailed look; but in short I can say: the lxd-integrated administration of storage including zfs with its snapshot capabilities as well as the system container (multi-process) approach of lxc vs. the limited single-process container approach of Docker is the main reason I chose lxd over Docker.
Pros of Docker
- Rapid integration and build up824
- Isolation690
- Open source520
- Testability and reproducibility505
- Lightweight459
- Standardization217
- Scalable184
- Upgrading / downgrading / application versions105
- Security87
- Private paas environments84
- Portability33
- Limit resource usage25
- Game changer16
- I love the way docker has changed virtualization15
- Fast13
- Concurrency11
- Docker's Compose tools7
- Easy setup5
- Fast and Portable5
- Because its fun4
- Makes shipping to production very simple3
- It's dope2
- Highly useful2
- HIgh Throughput1
- Very easy to setup integrate and build1
- Package the environment with the application1
- Does a nice job hogging memory1
- Open source and highly configurable1
- Simplicity, isolation, resource effective1
- MacOS support FAKE1
- Its cool1
- Docker hub for the FTW1
- Super1
Pros of Vagrant
- Development environments352
- Simple bootstraping290
- Free237
- Boxes139
- Provisioning130
- Portable84
- Synced folders81
- Reproducible69
- Ssh51
- Very flexible44
- Works well, can be replicated easily with other devs5
- Easy-to-share, easy-to-version dev configuration5
- Great3
- Just works3
- Quick way to get running2
- DRY - "Do Not Repeat Yourself"1
- Container Friendly1
- What is vagrant?1
- Good documentation1
Sign up to add or upvote prosMake informed product decisions
Cons of Docker
- New versions == broken features8
- Unreliable networking6
- Documentation not always in sync6
- Moves quickly4
- Not Secure3
Cons of Vagrant
- Can become v complex w prod. provisioner (Salt, etc.)2
- Multiple VMs quickly eat up disk space2
- Development environment that kills your battery1