Why is Vagrant not considered an isolation, and Docker is, when Vagrant run a new OS and isolates everything in there? What is meant by isolation when one says: "if you're looking for isolation, use Docker"?
Docker is a more realistic option in most cases because of its flexibility, strong accessibility, and it's potential for all scale of projects, and even minimal resource consumption. However, for security-based projects, it's better to go with Vagrant and Virtual Machines.
Vagrant allows you to isolate all the necessary resources completely. However, compared to Docker, it requires more resources initially. Compared to Vagrant, Docker wins on this criterion because it spends fewer resources, and you can create Docker images faster than Vagrant virtual machines.
Advantages of Docker Containers Docker containers are process-isolated and don't require a hardware hypervisor. This means Docker containers are much smaller and require far fewer resources than a VM.
Virtual MachineVMs provide more isolation between neighboring systems, as you're using a separate operating system from other machines in the same physical server. Whereas in containers, you're operating within one OS, and flaws can affect the entire system.
Isolation in the meaning "only isolation" i.e., not virtualization. When you want to run linux apps on linux, we are talking about isolation; when you want to run any app on top of any os, then we talk about virtualization.
Where did you read that Vagrant was not considered an isolation?
Actually, this statement is true as Vagrant is not a Container backend nor a VirtualMachine. It is a manager. It can manage VirtualBox, VMWare and now Docker. Depending on what your needs are, you can achieve isolation through Vagrant via VirtualBox or Docker, but Vagrant does not provide the isolation by itself.
Now that Vagrant supports Docker, you can use it if you need to; however, Docker is very simple by itself and IMHO does not require a tools like Vagrant. When you are playing with Virtual machines, on the other hand, Vagrant is very helpful.
Vagrant is just a tool to create virtual machines (or even cloud instances and Docker containers). Vagrant itself does nothing for isolation. However, the tools it can handle (such as virtual machines or Docker) can be used for isolation (but also for many other things, isolation is just one of many aspects).
For some enlighment about the difference between Docker and VMs see How is Docker different from a normal virtual machine?
Docker: separates the application
from the underlying Operating System
that it runs on.
Docker virtualise the Operating System for the application.
Vagrant is a virtual machine manager, so let's compare the Virtual Machines to Docker.
Virtual Machines: separates the Operating System
from the underlying hardware
that it runs on.
virtual machine virtualise the hardware for the operating system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With