Are Vagrant and Docker competing technologies? Can the two of them co-exist or, even synergize? Join Rohit Dantas, Senior Software Engineer at AKQA, and take a peek at what environments each of them targets, as well as the set (or subset) of features they provide. You'll also spin up Vagrant box(es) and Docker container(s) for similar environments, to see first-hand how easy (or difficult) it is to do and compare the performance of these actions.
Automating Your Environment
A tool for Automation
• Lowers development environment setup time
• Increases parity between environments
• Eliminates the “works on my machine” syndrome
• Simple and elegant Workflow
Core Component: Boxes (base)
An Engine for Automation
• Lightweight and Portable
• Affords for a 1-to-1 mapping between environments
• Eases Scalability
Core Component: Containers
What do you get?
What do you build?
> Daemon > CLI > Registry
> Containers > Images > Dockerfiles
Containers vs. VMs
• Docker: All
• Vagrant Development
• Docker: Seconds
• Vagrant: Minutes
• Docker: Ubuntu (primary) and some Linux Distros
• Vagrant: Almost everywhere
• Docker: Compact, can run any shell commands
• Vagrant: Complete, can run full provisioning tasks
• Docker: Minimal
• Vagrant: Full VM Stack
• Docker: Certain shared components
• Vagrant: Complete isolation
Partial Builds / Re-builds
• Docker: Registry works as a Version Control system
• Vagrant: Partial support, but cumbersome
• Docker: In-built; Containers/Images can be spun up at low cost
• Vagrant: N/A
There are pros and cons for each type of virtualized system.
If you want full isolation with guaranteed resources then a full VM
is the way to go.
If you just want to isolate processes from each other and want to run
a ton of them on a reasonably sized host, then Containers might be
the way to go.
Better yet, use a combination of the two.
Pros and Cons