If you work in the tech industry, you’re likely to have heard of “containers” recently. Over the last few years, container technology has BOOMED into notoriety. Although Linux containers have existed for some time, they have really only reached mainstream popularity in the last several years with the release of an open source container project called Docker (which is lead by a company of the same name).
But before I get too deep into the history of containers, it’s important to understand what we mean by “container”, and why you might care about them. Although they weren’t named for them, Linux containers are often compared to shipping containers. If you think about it, Linux Containers solve a lot of the same problems for the software industry, that shipping containers solved for the shipping industry…
Before shipping containers, all cargo was shipped “break bulk” meaning, giant bags of grain would be shipped next to tanks of oil or stacks of tires or whatever else might be getting shipped. Every ship would have to be loaded by hand by dock workers (also called longshoremen or… DOCKERS – get it??). The labor of moving all that heavy cargo into place was very dangerous and injury rates among dock workers were high. Not only was the labor strenuous, it was also dreadfully slow. It could easily take two months to load a ship, and then another couple months to reload it at the other end. And that’s just ships, the cargo will likely also have to pass through trucks, trains, or maybe even both. All this manual labor and time, plus various other costs, made shipping incredibly costly both in terms of time and money. Not to mention that all that changing of hands afforded a lot of opportunity for items to… disappear. Bribing the crews handling shipped goods just to not steal them added even more to the cost of shipping. Also, different railroads, trucks, and shipping companies used various differently sized and shaped equipment. Inefficient packing was not only dangerous for the goods, but also lowered potential profits for shippers and raised costs for companies trying to ship their products. So essentially, you want your goods to be
- COMPATIBLE, with whatever shipping methods (truck, train, ship, or plane) your shipping company sees fit to use to get your goods from point A to point B.
- SECURE – to arrive at their intended destination just as you packed them. And ideally, you would like them to be
- EFFICIENT-ly packed- for the safety of the items as well as to keep shipping costs for both you and the shipping company low.
Now, consider how those same concepts apply to the software industry…
As you can see, the problems the Linux container solves for the software industry, are pretty analogous to those solved by the shipping container in the shipping industry.
You want your app to be:
- COMPATIBLE with whatever operating system your customer wants to use.
- just like a physical product company would want their products to be compatible with whatever methods the shipper sees fit to use.
- SECURE – you want your app to run securely on your customer’s systems, with minimal risk of being affected by external forces like malicious programs, or perhaps just oversubscription of hardware resources. Which is also a reason you want your packaging to be:
- EFFICIENT – the better your app runs on your customer’s hardware, the happier they’re likely to be, right? And your customer probably won’t be so thrilled if your software uses up all their available hardware and they have to buy more. Efficient packaging can help make everybody happy.
You might think this sounds a lot like problems VMs (virtual machines) can solve. The comparison between containers and VMs is a very common one. I’ll cover it in my next post. Also look forward to future posts which will go more in-depth on the compatibility, security, and efficiency of containers.
Would you like to learn more about how shipping containers revolutionized the shipping industry and led the global economy we have today? There happens to be a great book on the subject called “The Box: How the Shipping Container Made the World Smaller and the World Economy Bigger” by Marc Levinson (not a paid endorsement or anything, I just like this book). You can check it out on Amazon here. I’ve been reading it myself and the history is fascinating. I like to read it and think of ways the advent of the shipping container correlates to the advent of the Linux container.