What problem docker solves
1.Background
Since inspection of agile methodology , cycle time is very unfair for testing guys to put ui/api test scripts in place since major chunk of time consumed by bug cycle in sprint period .
2.Current state
Keeping agile in mind ,application now modularise and again break down into feature which come into sprint cycle are now called micro app and utilised to create micro services .Micro-service is atomic REST API around micro-app object .
3.Problem Identification
Once review done and merge into feature branch from developer ,code in feature-branch need to cherrypick and build in VM by tester .Here one more factor since every application is agnostic to infrastructure for database and OS state .It is quite possible there will be delta in dev/stage/production in provisioning and there is no such tool which detects it .
4. Intuitive Solution
In order to solve the provisioning issue VMware ,oracle virtual box and LXC given Virtual machine (VM) solution with support of hypervisor-I(bare metal) and hypervisor-II (guest OS) .These VMs can be serialised to image and can be downloaded and instantiated in production .But by its nature ,it is complete monolithic stack of kernel ,os and application .It acquires address space and CPUs from host in order to run independent OS (ubuntu ,centOS etc) in VM. By considering time and resource complexity ,there is no flexible implementation trade off.
On contrary docker provide light weight wrapper(30MB) which allow to wrap application along with dependency keeping goal to application abstraction while sharing kernel with host machine .you can spin off multiple docker container from docker image and put app and provision then serialised into docker image .Docker registry (private ) and docker hub (cloud) provide version control for docker images.
5.Workflow with commands
- Docker image pull /download from docker hub or docker registry
docker pull ubuntu
2.Spin off docker from docker images
docker run -it --name container_name ubuntu /bin/bash
3.Serialised to docker image
docker commit container_name app_image
4.Push into docker registry
docker tag app_image registry_ip:5000/app_image docker push registry_ip:5000/app_image
5. On Cloud
Since docker is one more application on OS can be push into cloud where it can spin off. On cloud premises storage (mounting) and networking (port forwarding ) is inevitable to orchestrate and manage application for scaling ,docker engine provide the same for docker container .Each cloud virtual machine can spin off multiple docker container which represent application instance hence load balancer get more application instance to distribute request for fast response time .
Without docker 10 host machine =10 application instance and with docker 10 host machine * 5 container (assume)=50 applications instance .
Hope this article given heads up on basic docker aka EAS(environment as service ), for more info check out official site.
Thanks and Regards,
Brahmananda