Introduction to Docker
Last updated
Last updated
Docker is an open source containerization platform for building, deploying, and managing containerized applications.
It enables to package applications into containers that encapsulate source code, libraries and dependencies required to run that code in any environment.
A virtual machine (VM) is a virtual environment that functions as a virtual computer system with its own CPU, memory, network interface, and storage, created on a physical hardware system (located off- or on-premises).
Software called a hypervisor separates the machine’s resources from the hardware and provisions them appropriately so they can be used by the VM.
Docker Vs Virtual Machine
Docker
Docker containers are easily portable because they do not have separate operating systems.
A container can be ported to a different OS, and it can start immediately.
On the other hand, virtual machines have separate OS, so porting a virtual machine is difficult as compared to containers.
Containers are lightweight and can startup very fast compared to that of virtual machines.
Virtual Machine
Virtual machine has its guest operating system above the host operating system, which makes virtual machines heavy.
While on the other hand, Docker containers share the host operating system, and that is why they are lightweight.
The virtual machine does no share operating system, and there is strong isolation in the host kernel.
Hence, they are more secure as compared to Containers. A container have a lot of security risks, and vulnerabilities as the containers have shared host kernel.
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
Containers share the machine's OS system Kernel and therefore do not require an OS per application.
Container is just a process running from directory and all the data is coming from image.
Lightweight
Isolation
Scalability
Performance
Portability