Friday, July 2, 2021

Docker Notes -1

 docker-compose down --rmi -all


how do we run two OS in one machine - Using Hypervisor


OS1  | OS2

----------

Hypervisor

-----------

Machine OS


Hypervisor : Virtual Box, VMVare, Hyper-v(only Windows)


Benifit creating Virtual machine

Run application in isolation

same application using different version

eg:

virtual Machine1{App1 with Node14, Mongo 4}

virtual Machine2{App2 with Node9, Mongo 3}


Problems with VMs

-----

Each machine needs full-blown OS (license)

Slow to start ( cause entire OS needs to start just as a normal machine)

Resource intensive ( takes certain Hardware - RAM, cpu ..)



Containers

-----

Allow running multiple apps in isolation(same kind of a isolation)

light weight

Use OS of the host ( share)

Start quickly ( OS already started)

need less hardware resources


so can run more containers compared to vms


docker run client - server architecture

client communicate using RESTApi

server --> docker engine


technically container is a process



basically all containers use kernal of the host
kernal - manages all applications and hardware




No comments:

Post a Comment