Sitemap

Docker and Container Based Development

4 min readJul 15, 2022

--

Docker is a product and also a company. In past days the programs have contain in a physical server. When assume there is application server and database and web server and those days there were separate physical servers for these each server. Then it has to maintain space, network, operating system and maintenance cost etc. Because the observer or web server may not use full amount of processing power or the memory might not use hundred present and also, the database server may not use hundred present spaces in the database. Then the next generation use hypervisor and virtual machines.

There is web server and AB server and database service in physical hardware boxes. The problem is it needs a person to maintain the servers. If multiple services need multiple people to maintain this. Then the network and space more than wase because servers not consuming hundred presents. Then there is a technology called hypervisor and that use single type-high processing hardware box and install multiple virtual machines on top of the hypervisor. When assume one VM for web server and second to observer. Then one take 20% processing power other one 30%. Altogether there is 50% processing power. Then there are other virtual machines like proxy or mail server or load balancer to use the space to create them. The wastage was minimum. For maximize the investment then install an operating system on top of each virtual machine maybe Linux or any other operating systems. Then on top of the operating systems the application is installing and now it is a virtualized environment. The generation two has no problems because this has some hard work because have to separate three different parts of operating systems. It is a cost to have licensing in Linux but can take red hat enterprise that have to pay. But it reduces the maintains cost and update and lot of work.

There is another problem that need other web service. So, need to install another VM and need to install another web server. Even though the service has installed there is lots of configuration that has to do because some hostname cannot stay in the same network and likewise there is solutions but not still a good solution. Then the generation three called containers and there are no multiple operating systems to maintain. A VM is not starting in limited time because need to boot build process and operating system also taking long time to start. With the booting time there is a issue in timing because if need to spin new virtual machine it takes some time and maintenance cost also high.

There is containerized application still in the same hardware box and on top of that single operating system has installed. Then solving one problem which patching licensing maintenance and updates. To solve those problems, create Docker on top of the operating system. This containers or blocks would be contained up or block up. On top of the Docker container create the application. The docker or container not equal to the hypervisor. Container is very small than the hypervisor. Because it has it own configure or operating system because docker don’t have those.

There was a cloud platform called dot cloud and it use contain tech internally, so they created this service separately. It is a technology by the way separate project called docker. Docker is a open source project licensed by backed by Apache 2.0 license. That means docker is not own by Docker and it’s like they are the biggest hand behind the docker project.

Get Hansika Samaraweera’s stories in your inbox

Join Medium for free to get updates from this writer.

VM is a hypervisor and docker is a container. The docker makes things easy because it does not have multiple operating system or many other works. The biggest advantage is there is no multiple operating systems to boot and docker run on already started operating system. So, the application is very fast to boot

There is something called docker engine. It is not the docker project. It is a very small part of orchestration registry security service all those build on top of this docker engine. Orchestration one is registering. Registry is a place that can store the docker images. The docker image make some customizations and can push those images back to the registry. If the environment has multiple hosts and if need those customized image pack can login to the hosts and get those. Also, can create public or private repositories.

The orchestrating is a process, and it takes all the instance together and go for a common goal. When it comes to micro level different services, can create different containers for those. When there is multiple components, this orchestration is the process to take them together and continues for single goal.

Another problem is the think as Docker is not persistence like when shutdown docker lost everything. That is wrong and docker is by nature persistence. If a database has created which is always advisable to use the data in external environment and even though the docker is persistence.

Another belief is docker is only for new applications but the legacy application half true and false. when using docker it is always good to use micro level service architecture. Then only can create independent containers. It leads to self-healing capabilities in the program. If the legacy systems immigrating to the docker it is better to have this architecture. technically there is no limitations to apply docker but the architecture matters.

Reference

[1] Krish Dinesh.” Introduction to Docker and Container based development” Available: https://www.youtube.com/watch?v=cUiU8yDdQmw&list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&ab_channel=KrishDinesh. [Accessed: July 05,2022].

--

--

Hansika Samaraweera
Hansika Samaraweera

Written by Hansika Samaraweera

Associate Software Engineer at Virtusa