Virtual machines generally include entire operating system along with the application. They also need a hypervisor running along with them to control the VM
Host Operating System : Host refer as the bare metal machine/server/node and the OS you install on server is called as Host OS. This OS can also be called as Hypervisor.so need a hypervisor running along with them to control the VMtion.
Hypervisor : A hypervisor is also known as a Virtual Machine Manager (VMM) and its sole purpose is to allow multiple “machines” to share a single hardware platform e.g VMware's ESXi Type 1 hypervisor , HyperV - WindowsGuest OS is the OS installed on virtual machine(VM) that is created on top of Host machine is called as Guest OS (GOS)
A physical server can have multiple virtual machines and each VM can run its own guest OS. One guest OS can run Linux while another could run Windows.
Standardization
Most containers are based on open standards and can run on all major Linux distributions, Microsoft, etc
Computing environment portability
Containers encapsulate all the relevant details like application dependencies and operating systems, which are essential to run the application. This helps ease the portability of the container image from one environment to another. For example, the same image can be used to run in Windows/Linux or dev/test/stage environments.
With n number of containers running an application, there is an increase in the complexity factor as well. Management of so many containers can be a challenging task in a production environment. Tools like Kubernetes and Mesos can be utilized to manage n number of containers.
Most container technologies, such as Docker, arebased on Linux containers (LXC). Therefore, running these containers on a Microsoft environment is a bit clumsy and their daily use can bring up complications, compared to running these instances on Linux natively.
A container is a standard unit of software that functions likea fully provisioned machine installed with all thesoftware needed to run an application.
It’s a way of packaging softwareso that applications and their dependencies have a self-contained environment to run in, are insulated from the host OSand other applications -and are easily portedto other environments.
A container is NOT a VM. Acontainer leverages several features of the Linux OS to “carve out” a self-contained space to runin.
Containers are running instances of images.
Images define what goes into a container.
Containers are built from images.
TRADITIONAL DEPLOYMENT VIRTUAL DEPLOYMENT
CONTAINER DEPLOYMENT
Virtual Machine |
Container |
Starts in minutes(boot). The provisioning of resources takes time. Each virtual disk image is large and bulky and getting a VM ready for use can take up to a minute! |
Starts in Milliseconds(boot) |
Waste Resources( Each Guest OS will take approximately 800 mb X Number of applications running 800 Mb *3 =2.4 GB +CPU and Memory resources |
Save Resources |
virtualization required to run different applications |
virtualize the operating system (your standard libraries, packages, etc) itself, not the hardware |
Isolate Systems and system resources |
Isolate applications |
VM mainly used for isolating different customers |
Container mainly used for isolating applications.instead of providing virtual hardware to a VM, you provide a virtual OS to your application |
VM is fully self contained .
|
Docker containers have shared infrastructure |
VM do not share infrastructure |
Docker containers share resources with your host os through Docker deamon |
Docker containers as really lightweight Virtual Machines
Docker as a software packaging and delivery platform
Way to create a Docker image ( a plan)
A text file that contains (in order) all of the instructions tobuild an image
Has a specific format and structure
Each instruction in a Docker filecan create a read-only layer
Docker build images by reading instructions from a Docker file. A Docker file is a text document that contains all the commands a user could call on the command line to assemble an image.
docker image build command uses this file and executes all the commands in succession to create an image.
Docker Architecture