Tuesday 8 November 2016

Unknown

Containers (Docker)


Recently, I invited Mr. Ahmed to my college to give a talk on Containers and Docker. This blog is a synopsis of things I understood by attending his talk.

What are Containers?

Containers are a solution to the problem of how to get software to run reliably when moved from one computing environment to another. When a developer writes a package, he usually has the latest and greatest software configured in his system. He builds the package depending on that but when the same package is shipped to Customer or client, it doesn't work. The main reason behind are the dependencies.
This can be easily explained with an example. let's say I built an application with Java JDK 1.8.0 but the client is still using JDK 1.7.0 . As it is obvious that if he upgrades the version, his other applications, that work on the previous version might show error. To solve this issue, containers are used. Container can be imagined just like real world containers on a dock. It doesn't matter what is inside them. All the containers can work on the same platform without any conflict. A container packages an entire environment i.e an application, plus all its dependencies, libraries and other binaries, and configuration files needed to run it.

Power of Containers:

1. Standard format everyone agrees on.
2. Once you seal it, it gets shipped 'as is'.
3.Separation of concerns.

    Building
    Packaging 
    Shipping

Containers vs Virtual machines


Virtual machines can also be used to solve this problem, but it uses a full Operating System. A container requires about 10-20 MB depending on the application size whereas an operating system will take memory in Gigs. In virtual machines, each operating system for a particular application will have its own kernel making it a very heavy task for system. Let's say there are two virtual machines running on a operating system. In total there are 3 kernels running in the case of containers, all the containers share the base OS' kernel making it very light and thus, servers can operate more applications than the case of VM's.

Advantages of Containers:
    Only one kernel runs on a machine.
    Process Isolation and security
    Only the user space libraries are part of the container
    No hypervisor overhead
        Apps run directly on CPU
        Rack space & power & more free CPU cycle.

Some users of containers
Google :Borg
twitter : Mesos
etc


What is Docker?

Docker is a container engine. It wraps a piece of software in a complete file system that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.[1]

 
Docker, the container?

Nowadays, people think docker as a synonym of container but container technology has been there for more than 10 years. It started in form of LXC and after that many other containers came. Docker is famous because it has been very successful in popularizing it but it is not alone in this market. One of the biggest alternative is RKT, a command line tool for running app containers produced by CoreOS.


Is CONTAINER > VM?

No! not yet. It is not as secure as a vm and it is not going to replace vms completely but it is growing rapidly.


*Next I will be writing about 'How to run a simple container?'  (In next post)*


Unknown

About Unknown -

FOSS enthusiast, Linux evangelist and a programmer heart and soul. In love with Python and C. I contribute to fedora project and seek opportunities to learn more.

Subscribe to this Blog via Email :

3 comments

Write comments
Unknown
AUTHOR
8 November 2016 at 07:19 delete

Awesome explanation man๐Ÿ‘Œ! Keep it up ๐Ÿ‘

Reply
avatar
Unknown
AUTHOR
8 November 2016 at 22:09 delete

Thanks Buvanesh. You guys are my inspirations :)

Reply
avatar
Anonymous
AUTHOR
30 January 2022 at 10:38 delete

Baccarat & Strategy: A Complete Guide
Baccarat is a game where you try to predict the ๋ฐ”์นด๋ผ์‚ฌ์ดํŠธ outcome of the game of ์ œ์™• ์นด์ง€๋…ธ casino table games. The aim of Baccarat is to predict the outcome kadangpintar of the

Reply
avatar