Containers Vs Virtualization
Containers Vs Virtualization
containers and
virtualization tools
(Docker)
Imo Inyang
Full Stack Developer @
Reimnet
@imo_inyang on twitter
imo@reimnet.com
What is Virtualization?
virtualization refers to the act of creating
a virtual (rather than actual) version of
something, including virtual computer
hardware platforms, operating systems,
storage devices, and computer network
resources.
VM Virtual Machines
-Hypervisor and Vagrant
Containers
-Docker introduction
---Basic Setup and usage
Virtual Machines
A VM is essentially an emulation of a
real computer that executes programs
like a real computer. VMs run on top of
a physical machine using a hypervisor.
A hypervisor, in turn, runs on either a
host machine or on bare-metal.
Virtual Machines
hypervisor
A hypervisor is a software, firmware, or
hardware that VMs run on top of. The
hypervisors themselves run on physical
computers, referred to as the host
machine. The host machine provides the
VMs with resources, including RAM and
CPU. These resources are divided between
VMs and can be distributed as you see fit.
Type 1 hypervisor
Type 1 hypervisor (also called a bare metal
hypervisor) is installed directly on physical
host server hardware just like an operating
system. Type 1 hypervisors run on dedicated
hardware. They require a management
console and are used in data centers.
Examples
Oracle OVM for SPARC, ESXi, Hyper-V and
KVM.
Type 2 hypervisor
hosted hypervisor, is a virtual machine
manager that is installed as a software
application on an existing operating system
(OS).
Examples
VMware Fusion, Oracle Virtual Box, Oracle
VM for x86, Solaris Zones, Parallels and
VMware Workstation
Containers
So why Docker?
Why Docker?
Docker Container
This are real instances of an application Created from docker
images
Docker Daemon
Build, run and distributes docker containers
Docker Client
Docker on our local mechine - Think of it as the UI for Docker.
Docker Hub
A repository for docker images ( github for docker)
Dockerfile
A Dockerfile is where you write the instructions to build a
Docker image. These instructions can be:
RUN apt-get y install some-package: to install a software
package
EXPOSE 8000: to expose a port
ENV ANT_HOME /usr/local/apache-ant to pass an
environment variable
and so forth. Once youve got your Dockerfile set up, you can
use the docker build command to build an image from it.
Heres an example of a Dockerfile:
Installing Docker
Visit
https://docs.docker.com/engin
e/installation/
Docker Commands
Docker run <image>
Docker start <name | id >
containers
Docker rm <name | id >
Flags
Docker accepts upto 4 or more flags per command
Flags Value