Docker is a buzz word in container market. Hai guys i am not talking about shipping container i am talking about containers in which software engineers shipping their code to production.
Containers having long history in enterprise server market like Solaris Containers or Solaris sparce root zone,HPUX Containers where it was famous to run multiple servers inside single Unix system and same was available in BSD Jail.It was not famous and not became common word in software engineering domain because of technology only kept on infrastructure side on high end servers and limited people those who used to work on it. But now we should not talk about those copy righted world where they tried their best to not disclose source code and being an open source enthusiast i should only talk about Open source projects like Docker, Rocket, Linux Containers.
Docker is top most popular product/software in container market where container environment is grooming and many related product mushrooming around it.I will say Docker as container is having around 90% market in open source container market where some some of the share is taken by other related products/projects like Linux container and Rocket.Docker is a technology as well as company and at this time and dotcloud is the parent company under which Solomon Hykes developed this software. He was operation engineer instead of software engineer there when he developed this software and currently serving as CTO to dotcloud company.
What is Rocket?
Rocket is another similar container project started by co founders of Docker project those who separated them self from parent product due to ambiguity on direction of Docker project on security aspect and they launched Rocket with those feature like verification of container image using checksum so that user can verify that they are running container without any malicious code.
As every one know that open source is a world where any one can try anything and market gets fragmentation and to help container market all big horses joined together and came under single umbrella and they named it as Open Container Project(OCP) under Linux Foundation and under this DotCloud(Parent company of Docker) released or donated docker engine code under open source license where other players also started sharing their code base in open source community.
CoreOS is a Linux OS project that mainly providing cloud based linux OS where containers are major component kept in mind and gaining market share and most of the container instances are running these days. Its getting popularity in the market and recommended OS solution where you are designing micro service based applications.Default container engine is docker on it but CoreOS is in favour of Rocket.
Let us talk some more about docker…
Docker is a software engine that directly talks to your operating system and further coordinates with containers running on it and for that it uses libraries like (LXC, libcontainer, libvirt, systemd-nspwan). LXC was original library used by Docker but due to less control on LXC project they decided to write their own library and they came up with “libcontainer” library and now this is default library used by docker engine where it provides option to switch in between any available library.
#docker run -it ubuntu
Just writing above command will start a new container on your host where you have docker engine installed and on ubuntu
- #apt-get update
- #apt-get install docker.io will install docker engine.
- Containers are possible due to Linux namespaces and cgroups and you can read more about it as i am going to have separate blog on it.
i.e. Docker engine talking to OS using container libraries
- Minimum Linux kernel 3.0 is required to install Docker but 3.10 is recommended
Let us talk about Docker components like docker-engine, docker client, Images, containers, HUB or Repositories, docker swarm clustering, docker machine, docker for windows etc etc. There are more uncommon projects but those are also going to become critical part of docker framework in future as docker environment require more mature components so it can be implemented at enterprise level with much mature tool set. In 2014 Docker announced that they will release version for Windows and in 2016 they came up with windows docker engine with following limitations:
i.e. Docker architecture
Supported Docker host for windows:
- Windows 10 Professional edition
- Windows Server 2016 enterprise edition
- And only Windows Core server can run as container no GUI
- On non supported host go with Docker toolbox project.
Mac, Windows, Linux are supported as Docker host and on Windows there are still some limitations where you can’t run both linux and windows as containers simultaneously and you have to switch back and forth in case you want to run linux on windows mode.
Free docker environment by docker community and it will provide you docker host for 4 hours where you can play with multiple docker setup and now they also supports Docker swarm cluster as docker compose template:
Docker Images are build time constructs that is composed of layers(for naive users it is like a OS ISO to start OS) where base layer is orignal installed OS that people use it to run container on which further they do their read or write operations. Docker image layer is possible using overlay file system or union file system i.e. AUFS. Linux alpine is smallest OS image with 8 MB and most famous is ubuntu one that is having around 90 MB image.
i.e. Docker Image architecture
#docker images – is the command to list available images with your and
#docker pull – is the command to download OS images from HUB or repository
When you do #docker run ubuntu and in case it not founds it automatically downloads from your repository system.
Docker Hub(https://hub.docker.com), is Docker repository where all public and private repository are available to upload or download. There is “registery” container available in case you want to start your own local repository in your organization.
“docker” command is a client that connects to docker-engine process running on your system and its API based model where client connects to docker-engine API server to communicate and fetch information from system like #docker images, ps,push,pull all command talks in this way.
Let us talks some thing about docker networking where docker installation automatically created “docker0” bridge that all containers uses for inter communication and ICC and Iptables are used to control inter communication using inbuilt and local available firewall.
To Summarize i will say it is going to replace most of the existing virtual infrastructure where ever possible to release some of the resources and existing setup will get converted into micro service architecture that will be using containers as these are easily replaceable and scale-able. I write more stuff about docker and containers that will talk in detail about components but thought to initiate on docker or containers so that i can give you glimpse of this new environment.