In my previous post, I mentioned that Microsoft is embracing docker, partnering with them, totally jumped in to this Docker wagon. As a former Microsoft employee, that was really kind surprise to me. I feel Microsoft has become really a different company with a new CEO. Also, to correct 2 of my friends working in Microsoft: NO, Docker does not support native Windows yet as of 5/30/2015. It will though, see here.
In this post, I’m going to talk about another company that really surprised me in this Docker world – CenturyLink. Yeah, you heard me, the CenturyLink cable company that did a lot of cheesy ads on $19.99 high speed internet for 5 years which is actually DSL and bundles with phone service. I used their DSL couple years ago. The experience was in one word: nah.
But, I have no clue what got into them or maybe their Innovation Lab is a completely separated entity, they seems to be a big player in this new Docker trend. I read quite a few good articles from them about Docker and watched several interviews the conduct with key person from Docker Inc. And more related to this post, they have this amazing tool that can really help you understand what a docker image looks like. Let’s load the sample images and see what we can learn.
Now, image these are cakes that are upside down. Each cake have different layers but they may have the same base. And the baker can bake one huge base and then put different stuff on top of them to become different cake. Some cakes can be very similar and share more than one base but several layers. In the picture above, ruby, python and node have the first 5 layers exactly the same. Only start to be different on the 6th layer.
Unlike a cake, and unlike virtual machine, the base layers is re-used in docker and it not reused by copy paste but reused as in there is only one copy of that layer needed. So say if you have python already on your machine with all the layers python need, and now you want to get ruby, it only need to pull down 5 layers instead of 10 since you already got the first 5 layers of ruby. Compare this to a virtual machine. Say you have a virtual machine running Windows, and then on top of it Microsoft Word, now you want a virtual machine running Windows and Microsoft Excel, you have to create a virtual machine image that have a completely separated Windows instance.