Vagrant
It was created to create preconfigured VMs. The idea of creating a VM to simulate environments and share with your colleagues is great, but it's a problem to spend hours installing an operating system from scratch and then installing and configuring all the tools. HashiCorp, the organization that owns Vagrant, created a scheme to make this process more automatic and practical.
Need a VM with Oracle 12c? Search the Atlas . Maybe someone has already put that picture together. Laravel , MVC framework in PHP, has already joined Vagrant as an official method.
In addition, Vagrant uses its own language to manipulate virtual machine settings, called Puppet . There is also the Packer , another tool used to replicate configuration across multiple environments. That is, a configuration is sufficient for different operating systems.
Docker
The Docker was born of another very creative idea, and for her, we will invoke the figure of the nice whale that is her mascot.
Whale is the empty operating system. Each box is a segment of this operating system, which can be an application or set of applications working together.
Why was this created? Returning to the same problem of Vagrant, in which we have to replicate several times a VM. Suppose we now want to run multiple VMs at the same time. Why not just use a basic image of one operating system and all other processes use the same image?
The whale is that. This is the image of the operating system.
Each box is a feature that runs on top of the operating system, ie the whale. With this, we have some savings:
- Disk space;
- Execution memory;
- Redundancy elimination.
If speaking of security, is it safer for the host system to have a web server running as a container or VM?
Both offer a legal level of security, restricted by port control, as a kind of firewall between the host level and the virtualized level.
Initially I figured that Docker would be more prone to this since it shares the same kernel.
That's true just for Linux . Docker, on Windows and Mac, runs another kernel to make its containers viable.
Each Docker image is directed to a different operating system. For example, we have the Windows SQL Server image and another image of the same SQL Server with the implementation for Linux .