What is Docker ?
- Wikipedia defines Docker as
Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".It was first released in 2013 and is developed by Docker, Inc
Docker is used to run software packages called "containers". Containers are isolated from each other and bundle their own application, tools, libraries and configuration files; they can communicate with each other through well-defined channels. All containers are run by a single operating-system kernel and are thus more lightweight than virtual machines. Containers are created from "images" that specify their precise contents. Images are often created by combining and modifying standard images downloaded from public repositories.
- Docker Inc. defines as
Docker is a platform for developers and sysadmins to develop, deploy, and run applications with containers. The use of Linux containers to deploy applications is called containerization. Containers are not new, but their use for easily deploying applications i
- and there are many more definitions
Understanding what is docker?
To understand docker, it is essential that we understand what a container is, So lets try to understand what is a container. To make this process simple by considering an application deployment in Virtual Machines and Docker Platform
- I would be taking an example of need for deploying two applications
- runs on tomcat
- runs on node js
Virtual Machine
-
Lets Understand how virtual machines can achieve the above mentioned application deployments
-
First we need to have a physical/cloud based infrastructure, on top of it we would be installing the host operating system, then we would install hypervisors like Vmware, Virtual Box, Hyper-V etc.
-
Then we would create two different virtual machines. In each virtual machine we would
- install operating system
- install necessary softwares
- allocate memory etc
Docker
-
Lets Understand how docker containers can achieve the above mentioned application deployments
-
First we need to have a physical/cloud based infrastructure, on top of it we would be installing the host operating system, then we would install docker.
-
Docker will create two different isolated areas on your OS where we can run our applications. By the way this isolated area is called as Container
-
Unlike Virtual Machine, there is no need to install host os , we can directly deploy our applications.
-
Your applications will still be isolated, as they get the different virtual ip address, different memory spaces etc
-
Important Docker is used to isolate individual applications not entire systems, whereas to isolate entire system we would go for hypervisors & create Virtual Machines
Now you can have a look at above definitions & things should be clear.
Hello,
I have similar question, if earlier i am running two guest OS’s (Ubuntu/Redhat) where i have tomcat and nodejs applications running.
Now under Docker how we can achieve this, as the Docker image can be made of either Ubuntu or Redhat.
and we cannot have guest OS installed like the previous representation instead we are having the same image which we have installed as OS through Docker Daemon, and if i want to run my both applications i.e. tomcat and nodejs on different linux flavour, then how am i supposed to achieve it?
please to reply on the same.
Thanks
Kp
You give more focus on app not on underlying os, however if you choose your base image your container runs in that flavour of Linux
virtual machine : In this topic you creating two machines one is ubuntu for tomscat application and other one is redhat for node js application it is clear.
docker : In this topic you taken one machine either ubuntu or windows in that you install docker and use docker create two containers one for tomcat and other one for node js . this two application run in one machine ubuntu form to here clear.
In virtual machine two applications run in two different os. but in docker two application run in single os only. incase i need two applications run in two different os by using docker. it is applicable or not, in case of applicable how?
We will cover this in next class when we try to understand images