Need advice about which tool to choose?Ask the StackShare community!
Docker vs VirtualBox: What are the differences?
Introduction
In the world of virtualization, Docker and VirtualBox are commonly used tools. While they serve similar purposes, there are key differences between the two that set them apart.
Resource Overhead: Docker uses the host system's kernel and shares the resources of the operating system, resulting in lower overhead compared to VirtualBox, which requires a full virtualized operating system for each instance.
Isolation Level: Docker containers provide lightweight isolation through namespaces and cgroups, making them faster and more efficient than VirtualBox VMs, which require complete separation of resources.
Portability: Docker containers are highly portable as they can run on any system with Docker installed, whereas VirtualBox VMs are more restricted in terms of portability due to the necessary virtual machine setup.
Startup Time: Docker containers have significantly faster startup times compared to VirtualBox VMs since they do not need to boot an entire operating system.
Image Size: Docker images are usually smaller in size compared to VirtualBox VM images because they only contain the necessary components and dependencies for the application to run.
Use Case: Docker is typically used for microservices architecture and application containerization, while VirtualBox is more suitable for running multiple operating systems concurrently for purposes like testing or development.
In Summary, Docker and VirtualBox have distinct differences in terms of resource overhead, isolation level, portability, startup time, image size, and use case.
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 up823
- Isolation692
- Open source521
- Testability and reproducibility505
- Lightweight460
- Standardization218
- Scalable185
- Upgrading / downgrading / application versions106
- Security88
- Private paas environments85
- Portability34
- Limit resource usage26
- Game changer17
- I love the way docker has changed virtualization16
- Fast14
- Concurrency12
- Docker's Compose tools8
- Fast and Portable6
- Easy setup6
- Because its fun5
- Makes shipping to production very simple4
- It's dope3
- Highly useful3
- Does a nice job hogging memory2
- Open source and highly configurable2
- Simplicity, isolation, resource effective2
- MacOS support FAKE2
- Its cool2
- Docker hub for the FTW2
- HIgh Throughput2
- Very easy to setup integrate and build2
- Package the environment with the application2
- Super2
- Asdfd0
Pros of VirtualBox
- Free358
- Easy231
- Default for vagrant169
- Fast110
- Starts quickly73
- Open-source45
- Running in background42
- Simple, yet comprehensive41
- Default for boot2docker27
- Extensive customization22
- Free to use3
- Mouse integration2
- Easy tool2
- Cross-platform2
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