Need advice about which tool to choose?Ask the StackShare community!

Docker

100.8K
79.7K
+ 1
3.8K
Vagrant

7.9K
5.8K
+ 1
1.5K
Add tool

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.

Decisions about Docker and Vagrant
Florian Sager
IT DevOp at Agitos GmbH · | 2 upvotes · 167.2K views
Chose
LXD
over
Docker

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.

See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of Docker
Pros of Vagrant
  • 821
    Rapid integration and build up
  • 688
    Isolation
  • 517
    Open source
  • 504
    Testa­bil­i­ty and re­pro­ducibil­i­ty
  • 459
    Lightweight
  • 217
    Standardization
  • 182
    Scalable
  • 105
    Upgrading / down­grad­ing / ap­pli­ca­tion versions
  • 86
    Security
  • 84
    Private paas environments
  • 33
    Portability
  • 25
    Limit resource usage
  • 15
    I love the way docker has changed virtualization
  • 15
    Game changer
  • 12
    Fast
  • 11
    Concurrency
  • 7
    Docker's Compose tools
  • 4
    Fast and Portable
  • 4
    Easy setup
  • 4
    Because its fun
  • 3
    Makes shipping to production very simple
  • 2
    It's dope
  • 1
    Highly useful
  • 1
    MacOS support FAKE
  • 1
    Its cool
  • 1
    Docker hub for the FTW
  • 1
    Very easy to setup integrate and build
  • 1
    Package the environment with the application
  • 1
    Does a nice job hogging memory
  • 1
    Open source and highly configurable
  • 1
    Simplicity, isolation, resource effective
  • 352
    Development environments
  • 291
    Simple bootstraping
  • 238
    Free
  • 139
    Boxes
  • 132
    Provisioning
  • 84
    Portable
  • 81
    Synced folders
  • 69
    Reproducible
  • 51
    Ssh
  • 44
    Very flexible
  • 5
    Works well, can be replicated easily with other devs
  • 5
    Easy-to-share, easy-to-version dev configuration
  • 3
    Great
  • 2
    Quick way to get running
  • 2
    Just works
  • 1
    What is vagrant?
  • 1
    Container Friendly
  • 1
    DRY - "Do Not Repeat Yourself"
  • 1
    Good documentation

Sign up to add or upvote prosMake informed product decisions

Cons of Docker
Cons of Vagrant
  • 7
    New versions == broken features
  • 4
    Documentation not always in sync
  • 3
    Moves quickly
  • 3
    Unreliable networking
  • 2
    Can become v complex w prod. provisioner (Salt, etc.)
  • 2
    Multiple VMs quickly eat up disk space
  • 1
    Development environment that kills your battery

Sign up to add or upvote consMake informed product decisions

What is Docker?

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?

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.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention Docker and Vagrant as a desired skillset
What companies use Docker?
What companies use Vagrant?
See which teams inside your own company are using Docker or Vagrant.
Sign up for Private StackShareLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Docker?
What tools integrate with Vagrant?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

+7
3
643
+14
11
2027
Jul 9 2019 at 7:22PM

Blue Medora

+8
11
1715
+8
6
2181
+17
32
28366
What are some alternatives to Docker and Vagrant?
LXC
LXC is a userspace interface for the Linux kernel containment features. Through a powerful API and simple tools, it lets Linux users easily create and manage system or application containers.
rkt
Rocket is a cli for running App Containers. The goal of rocket is to be composable, secure, and fast.
Kubernetes
Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.
Cloud Foundry
Cloud Foundry is an open platform as a service (PaaS) that provides a choice of clouds, developer frameworks, and application services. Cloud Foundry makes it faster and easier to build, test, deploy, and scale applications.
Red Hat OpenShift
OpenShift is Red Hat's Cloud Computing Platform as a Service (PaaS) offering. OpenShift is an application platform in the cloud where application developers and teams can build, test, deploy, and run their applications.
See all alternatives
Reviews of Docker and Vagrant
Co-Founder and CTO at Tipe
Review of
Docker

Docker is the new kid on the block disrupting virtualization nowadays. You're able to save up to 70% of your development cost on AWS (or any other cloud) switching to Docker. For example instead of paying for many small VMs you can spin up a large one with many Docker containers to drastically lower your cost. That alone is only one of the reasons why Docker is the future and it's not even the best feature: isolation, testa­bil­i­ty, re­pro­ducibil­i­ty, standardization, security, and upgrading / down­grad­ing / ap­pli­ca­tion versions to name a few. You can spin up 1000's of Docker containers on an ordinary Laptop, but you would have trouble spinning up 100's of VMs. If you haven't already checked out Docker you're missing out on a huge opportunity to join the movement that will change development/production environments forever

Review of
Docker

The support for macOS is a fake.

I can't work with docker in macOS because de network and comunications with the container don't works correctly.

How developers use Docker and Vagrant
Airbnb uses
Vagrant

"The best way to ensure that local testing was possible was to normalize people’s dev environments. For this we chose Vagrant. This, combined with Chef, allows us to do our local dev in sandboxed Linux instances running locally via VirtualBox in a configuration as similar to production as possible. In addition to making dev environment setup much easier than it used to be, this ensures that each engineer has a consistent environment that is ready to run tests out of the box. The user SSHs into the local linux server and runs spec commands like they would on their host OS, and generally everything Just Works. Most people on our team combine this with Zeus, which allows the Rails environment to be preloaded for lightning fast (relatively speaking) test runs. Both Vagrant and Zeus have their share of issues, but in practice we’ve found them to be a huge time saver."

ssshake uses
Docker

Currently experimenting. The idea is to isolate any services where I'm not confident yet in their security/quality. The hope is that if there is an exploit in a given service that an attacker won't be able break out of the docker container and cause damage to my systems.

An example of a service I would isolate in a docker container would be a minecraft browser map application I use. I don't know who wrote it, I don't know who's vetting it, I don't know the source code. I would feel a lot better putting this in a container before I expose it to the internet.

I believe I will follow this process for anything that's not properly maintained (not in an trusted apt-repo or some other sort of confidence)

AngeloR uses
Docker

We are testing out docker at the moment, building images from successful staging builds for all our APIs. Since we operate in a SOA (not quite microservices), developers have a dockerfile that they can run to build the entirety of our api infrastructure on their machines. We use the successful builds from staging to power these instances allowing them to do some more manual integration testing across systems.

Yaakov Gesher uses
Docker

Each component of the app was launched in a separate container, so that they wouldn't have to share resources: the front end in one, the back end in another, a third for celery, a fourth for celery-beat, and a fifth for RabbitMQ. Actually, we ended up running four front-end containers and eight back-end, due to load constraints.

sapslaj uses
Docker

Linux containers are so much more lightweight than VMs which is quite important for my limited budget. However, Docker has much more support and tooling for it unlike LXC, hence why I use it. rkt is interesting, although I will probably stick with Docker due to being more widespread.

Equinix-metal uses
Docker

We are running primarily as a micro-services platform and Docker lets us iterate on these smaller units consistently from dev to staging to production. It is also integral to our continuous deployment system for rolling out or rolling back new features.

GHA Technologies uses
Vagrant

Not blazing fast but we pick Vagrant for all our projects because the console mode without gui leads to a low consumption of ram memory making it the best way for DevOps ready environment requiring less configuration.

Cyrus Stoller uses
Vagrant

Vagrant allows me to ensure that anyone I'm collaborating with will be able to test my web application in the same environment. I also use Vagrant to setup VMs that I can use to refine my Capistrano recipes.

Dynamictivity uses
Vagrant

We use Virtualbox in combination with Vagrant during development to ensure a consistent test/development environment. This helps to reduce the number of defects when our software goes to production.

Software Antelope uses
Vagrant

Building development environments that closely match real world web environments, enabling more rapid and accurate testing and development.