Docker’s not using the term “unikernel” in relation to LinuxKit. But a unikernel is essentially what LinuxKit allows you to build. In that sense, LinuxKit reveals how Docker hopes to move beyond mere containers to create unikernels, which are cooler and better.
A unikernel is a type of container that houses absolutely everything you need to run an application, including not just the application code but also an operating system environment. In theory, a unikernel is capable of booting anywhere (although in practice, most existing unikernels platforms to date only work in hypervisor-based virtual environments).
The ability to self-host and boot anywhere is a big deal. Traditional Docker containers can’t do that. They require a traditional operating system to host them.
For that reason, unikernels could potentially enable a lot of cool functionality.
LinuxKit Means Unikernels
To date, unikernels have not been used for production purposes. The various unikernels projects in existence are experimental.
LinuxKit, a set of tools for building a Linux subsystem inside a container, could change that. Docker wants developers to use LinuxKit to build a lean, Linux-based operating system into their containers.
With a Linux subsystem built in, Docker containers are capable of running anywhere, including on environments that are hosted by other types of operating systems or even on bare metal. In that respect, a LinuxKit-enabled container looks a lot like a unikernel.
LinuxKit also helps developers create what are essentially unikernels because it allows them to build a customized, stripped-down Linux subsystem. They can include only as much operating system as they need to run an application and nothing more. That’s a key part of the unikernel’s value proposition.
Docker and Unikernels
Interestingly, Docker has so far been avoiding the word “unikernel” in the discussion about LinuxKit.
That’s not because the Docker folks aren’t aware of unikernels. Docker in January 2016 acquired a company called Unikernels Systems, which was developing unikernels technology. As early as a year and a half ago, Docker was thinking about how unikernels could factor into its strategy.
It’s not clear what, if anything, the Unikernels Systems acquisition had to do with the development of LinuxKit. But it is clear that Docker’s long-term plan is to get beyond basic application containers. It wants to create containerized environments that can self-host and run an application anywhere.
Docker didn’t invent Linux containers, and it didn’t invent unikernels, either. But it may be the first company to take both technologies mainstream.