What’s Old Is New Again (and Better): Understanding LinuxKit

LinuxKit, Docker’s latest open-source project, promises to enable you to run Docker containers wherever you want—on Linux, on Windows, on AWS or, if you feel like it, on your IoT-connected TV. But behind this huge innovation are some relatively old ideas.

Docker announced LinuxKit at DockerCon 2017 in Austin. As the company explains in a blog post that accompanied the announcement, LinuxKit provides a Linux subsystem that can be baked into a Docker containers. The subsystem contains everything necessary to run a minimalist Linux-based environment for hosting a containerized application.

So, in other words, it allows you to pack both the OS and the application into a container. The advantage of doing so is that your container can essentially host itself.

Because of this, it can run within any kind of environment—on a Linux or Windows server, on your Mac laptop, in the cloud or on an IoT device.

Why LinuxKit?

Docker’s LinuxKit announcement highlights three main aspects of the company’s current strategy:

  1. It wants to cultivate an image of itself as an open and community-friendly part of the container ecosystem. As an open source collaborative project, it helps Docker do that.
  2. It wants to make containers more portable. Before LinuxKit, there was no practical way to make a containerized Linux application run in an environment other than Linux (unless you used a virtual machine, but that kind of defeats the purpose of using containers).
  3. It wants to emphasize security. The ability to improve security by customizing the subsystem used to host an application is an important part of Docker’s message.

How Novel is LinuxKit?

LinuxKit is an important new tool that will benefit developers across the container ecosystem—particularly those who, until now, did not have a way to use Docker because they couldn’t run Docker containers in the environments for which they program.

In some key respects, however, LinuxKit is just a new implementation of some old ideas. It’s reminiscent of:

  • System containers, which use containerized environments to host a complete operating system. Virtuozzo‘s OpenVZ and Canonical‘s LXD platforms have made system containers possible for a long time.
  • Unikernels, a type of standalone, self-hosting environment that (in theory at least) can boot and run an application anywhere.
  • Minimalist Linux distributions customized to run Docker containers, such as Alpine Linux. The concept of a small, lean OS for Docker is not new.

LinuxKit is novel, however, in the respect that it integrates and optimizes these various ideas. It provides container developers a single, flexible, community-oriented framework for building minimalist Linux environments that fit inside system containers and can run in a way similar to unikernels.

So, essentially, LinuxKit takes some old ideas and makes them new again by implementing them in a better way.

Christopher Tozzi

Christopher Tozzi has covered technology and business news for nearly a decade, specializing in open source, containers, big data, networking and security. He is currently Senior Editor and DevOps Analyst with Fixate.io and Sweetcode.io.

Christopher Tozzi has 254 posts and counting. See all posts by Christopher Tozzi