0% found this document useful (0 votes)
6 views

Containers

Uploaded by

King Of Luck
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Containers

Uploaded by

King Of Luck
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Containers

What Are Virtual Machines (VMs)?

• Running software on top of physical servers to emulate a particular


hardware system.

• A hypervisor, or a virtual machine monitor, is software, firmware, or


hardware that creates and runs VMs
• The host operating system is software installed on a computer to
interact with the hardware.
• The guest operating system is software installed onto and running on
the virtual machine.
Hypervisor

Source:
Wikimedia(https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Hyperviseur.png/
400px-Hyperviseur.png)
Types of hypervisors
• Type 1
• A type 1 hypervisor acts like a lightweight operating system and runs
directly on the host’s hardware,
• Type 2
• A type 2 hypervisor runs as a software layer on an operating system,
like other computer programs.

Source: VMWare
[https://www.vmware.com/topics/glossary/content/hypervisor]
Characteristics of VM
• Each VM has its own binaries, libraries, and applications that it
services, and the VM may be many gigabytes in size.

• Each VM includes a separate operating system image, which adds


overhead in memory and storage footprint

• Launching a VM is slow and takes time to initiate.


What Are Containers?

• Containers provide a way to run these isolated systems on a single


server or host OS.

• They have all the benefits of the VMs without any short comings!!!
• Containers sit on top of a physical server and its host OS—for
example, Linux or Windows.

• Each container shares the host OS kernel and, usually, the binaries
and libraries, too.
• Shared components are read-only.

• Containers are thus exceptionally “light”—they are only megabytes in


size and take just seconds to start, versus gigabytes and minutes for a
VM.
• Containers also reduce management overhead.

• Because they share a common operating system, only a single


operating system needs care and feeding for bug fixes, patches, and
so on.
• Virtual machines and containers differ in several ways, but the
primary difference is that containers provide a way to virtualize an OS
so that multiple workloads can run on a single OS instance.

• With VMs, the hardware is being virtualized to run multiple OS


instances. Containers’ speed, agility, and portability make them yet
another tool to help streamline software development.
Source: https://blog.netapp.com/wp-content/uploads/2016/03/Screen-Shot-2018-03-20-at-9.24.09-AM.png
What is a container?
• 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

• A container image is a lightweight, standalone, executable package of


software that includes everything needed to run an application: code,
runtime, system tools, system libraries and settings.
Source:
https://www.docker.com/sites/default/files/d8/styles/large/public/2018-11/container-what-is-container.png?itok=vle7kjDj
• A containerized software will always run the same, regardless of the
infrastructure or the host operating system. Performance may vary.
• Containers isolate software from its environment and ensure that it
works uniformly despite differences for instance between
development and staging.
• Hypervisors:
• Allow an operating system to run independently from the underlying
hardware through the use of virtual machines.
• Share virtual computing, storage and memory resources.
• Can run multiple operating systems on top of one server (bare-metal
hypervisor) or installed on top of one standard operating system and
isolated from it (hosted hypervisor).
• Containers:
• Allow applications to run independently of an operating system.
• Can run on any operating system—all they need is a container engine
to run.
• Are extremely portable since in a container, an application has
everything it needs to run.
• Hypervisors and containers are used for different purposes.
Hypervisors are used to create and run virtual machines (VMs), which
each have their own complete operating systems, securely isolated
from the others.

• In contrast to VMs, containers package up just an app and its related


services. This makes them more lightweight and portable than VMs,
so they are often used for fast and flexible application development
and movement.
• VIRTUAL MACHINES
• Virtual machines (VMs) are an abstraction of physical hardware
turning one server into many servers. The hypervisor allows multiple
VMs to run on a single machine. Each VM includes a full copy of an
operating system, the application, necessary binaries and libraries -
taking up tens of GBs. VMs can also be slow to boot.
• CONTAINERS
• Containers are an abstraction at the app layer that packages code and
dependencies together. Multiple containers can run on the same
machine and share the OS kernel with other containers, each running
as isolated processes in user space. Containers take up less space
than VMs (container images are typically tens of MBs in size), can
handle more applications and require fewer VMs and Operating
systems.
Docker
• Just a software for containers, like Mozilla firefox and Google chrome
are both web browsers.

• Container images become containers at runtime and in the case of


Docker containers - images become containers when they run on
Docker Engine.
Docker containers that run on Docker Engine:

• Standard: Docker created the industry standard for containers, so


they could be portable anywhere

• Lightweight: Containers share the machine’s OS system kernel and


therefore do not require an OS per application, driving higher server
efficiencies and reducing server and licensing costs
• Secure: Applications are safer in containers and Docker provides the
strongest default isolation capabilities in the industry
Docker Engine
• The runtime that provides a platform for the container to run upon.

• Analogous to Hypervisors.
• “Developing apps today requires so much more than writing code.
Multiple languages, frameworks, architectures, and discontinuous
interfaces between tools for each lifecycle stage creates enormous
complexity. Docker simplifies and accelerates your workflow, while
giving developers the freedom to innovate with their choice of tools,
application stacks, and deployment environments for each project.”
• https://www.docker.com/why-docker

You might also like