Container Portability – What is so great about it?


Container Portability - What is so great about it?

July 24, 2019 - by Spruha Pandya

There is a lot of talk going around containers and the benefits that they bring to the table. Lightweight, agile, portable, fast, efficient…the list goes on and on. Portability is one of the prominent traits of containers as portability is a necessary feature in today’s software world. Applications that are able to run on only one type of host server or software environment so not meet business needs any more as they lack agility and are more difficult to maintain due to the constrictions to upgrade software and hardware.

Containers offer a new approach to build, ship and run applications by isolating the operating system. A container consists of an entire runtime environment bundled into one package – the application along with all its dependencies, libraries and other binaries, and the configurational files needed to run it. This brings forth the ability to “build once and run anywhere.” With containers, the code is compiled and placed into a container image. That image can then be deployed on any type of host environment. As all the application artifacts are stored within the container, environment variables outside the container shouldn’t impact the application. This way, portability comes naturally to containerised applications.

With the level of portability containers bring to the table, the application becomes independent of the host version of the deployment model and thus, can be transferred to another host and executed without any compatibility issues. This way, the processes of app development and app deployment are made independent of each other. Developers can focus on the business logic in applications without being concerned with the infrastructure that is necessary to make an application run, while the IT operations team can craft suitable container images for the application enabling it to run smoothly in various environments. Eventually, this results in faster time to market.

In short, by enabling portability, containers not only ease app development and app deployment but also bring forth several benefits from the business perspective. However, container portability has its own roadblocks. The significant ones are those related to Linux distribution incompatibilities, commercial licenses, security and networking. Also, porting containers from one family of OS to another is complicated. For enterprises that have complex IT ecosystems leveraging software developed by multiple external software vendors, this can be a major roadblock. VMs, on the other hand, do not fall short on this front. A Linux-based VM can typically run on a Windows host, and vice versa. For such cases, a hybrid app architecture, where containers are run on VMs, is used. In order to overcome this shortcoming, Docker launched a LinuxKit that allows developers to create a “Linux subsystem” within containers. This Linux subsystem provides a tiny Linux-based OS that runs within the container itself and enables the container to run on OS that is different than its own. Thus, achieving a maximum level of portability.

Considering all the factors related to container portability, it goes without saying that Docker containers do an amazing job.