Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Fusion Blog
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

https://media.licdn.com/dms/image/C4E12AQEFpwzHUWYbhg/article-cover_image-shrink_720_1280/0?e=1565222400&v=beta&t=j3RGE6Cd_gYerSo3nRQDNBJCidcbb44xzbfMTphSPnM

Docker V/S Vagrant

Recently, I came across several people posting about the confusion between Docker and Vagrant, so I 

Thought let me share some light on this subject as part of my post.

Both docker and vagrant allows one to create predictable and repeatable development environments. But the main difference between docker and vagrant is that docker uses container technology while vagrant uses virtual machines. What it means is that, in container, only necessary properties like code, runtime, system libraries and tools are kept and the application separate from outside influence. Whereas in a Virtual Machine (VM), it comes with its own complete operating system and resource allocation. The host machine provides the necessary physical resources but the virtualized environment works as an independent machine with its own BIOS, CPU, storage, and network adapters.

So what does that mean in simple terms, the below picture depicts:

 

So let’s understand briefly about some of the difference more between VM and Container.

Virtual Machine

A virtual machine (VM) is more like a physical computer which comes with its own complete operating system and resource allocation. However its the host machine that provides the necessary physical resources but the virtualized environment works as an independent machine with its own BIOS, CPU, storage, and network adapters. The VM technology can be used with VMware, Oracle Virtual Box and many more.

Modern virtual machines run on hypervisors that are the software, firmware or hardware responsible for the creation and execution of VMs. There are a lot of hypervisors available in the market. KVM, Red Hat Enterprise Virtualization (RHEV), XenServer, Microsoft Hyper-V and VMware vSphere / ESXi are the prominent players.

Containers

Containers create virtualization on the operating system level and they work as an executable software package that isolates applications from its surrounding environment. This makes it less resource hungry and lightweight. The container has the necessary properties like code, runtime, system libraries and tools to keep the application separate from outside environment. It runs on the operating system of the host machine and shares libraries and binaries when possible and only separates the absolutely necessary resources.

Docker

Docker is an open-source container technology and it is quite popular because it makes it easier to create, run and deploy applications in a self-contained environment. Docker doesn’t create a whole operating system like a virtual machine. Instead, it uses the kernel of the host’s operating system and creates virtualization only for the application and necessary libraries. This approach makes it much more lightweight than virtual machines.

Docker Containers are created from Docker Images which basically are snapshots of machines. Users can easily start a container from an image. There are several images available from Docker Hub such as Linux, Apache, Python, Nginx and many making it more flexible for other members for not going through the same installation process. And the best part here is that it helps maintain a consistent environment for everyone. More info can be found at https://www.docker.com/

Vagrant

Vagrant is an open-source software product for building and maintaining portable virtual software development environments, e.g. for VirtualBox, Hyper-V, Docker containers, VMware, and AWS. It tries to simplify software configuration management of virtualizations in order to increase development productivity. Vagrant is written in the Ruby language, but its ecosystem supports development in a few languages.

Vagrant uses "Provisioners" and "Providers" as building blocks to manage the development environments. Provisioners are tools that allow users to customize the configuration of virtual environments. Providers are the services that Vagrant uses to set up and create virtual environments.

Support for VirtualBox, Hyper-V, and Docker virtualization ships with Vagrant, while VMware and AWS are supported via plugins. More info can be found at https://www.vagrantup.com/

What should you choose?

The short answer is that if you want to manage machines, you should use Vagrant and if you want to build and run applications environments, you should use DockerVagrant is a tool for managing virtual machines. Docker is a tool for building and deploying applications by packaging them into lightweight containers.

Conclusion

Both, Docker and Vagrant are both important and useful technologies allowing the developers to improve their productivity. For rapid development and code sharing, Docker provides an advantage.

 

 


Sunil Khatri

Add comment


Security code
Refresh

About the Author

Sunil Khatri

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner