Meet k0smotron 1.0 - the future of Kubernetes cluster management   Learn More


OK, I give up. Is Docker now Moby? And what is LinuxKit?

Nick Chase - April 24, 2017
This week at DockerCon, Docker made several announcements, but one in particular caused massive confusion as users thought that "Docker" was becoming "Moby."  Well... OK, but which Docker? The Register probably put it best, when they said, "Docker (the company) decided to differentiate Docker (the commercial software products Docker CE and Docker EE) from Docker (the open source project)."  Tack on a second project about building core operating systems, and there's a lot to unpack.
Let's start with Moby.  

What is Moby?

Docker, being the foundation of many peoples' understanding of containers, unsurprisingly isn't a single monolithic application.  Instead, it's made up of components such as runc, containerd, InfraKit, and so on. The community works on those components (along with Docker, of course) and when it's time for a release, Docker packages them all up and out they go. With all of those pieces, as you might imagine, it's not a simple task.
And what happens if you want your own custom version of Docker?  After all, Docker is built on the philosophy of "batteries included but swappable".  How easy is it to swap something out?
In his blog post introducing the Moby Project, Solomon Hykes explained that the idea is to simplify the process of combining components into something usable. "We needed our teams to collaborate not only on components, but also on assemblies of components, borrowing an idea from the car industry where assemblies of components are reused to build completely different cars."
Hykes explained that from now on, Docker releases would be built using Moby and its components.  At the moment there are 80+ components that can be combined into assemblies.  He further explained that:

"Moby is comprised of:
  1. A library of containerized backend components (e.g., a low-level builder, logging facility, volume management, networking, image management, containerd, SwarmKit, …)
  2. A framework for assembling the components into a standalone container platform, and tooling to build, test and deploy artifacts for these assemblies.
  3. A reference assembly, called Moby Origin, which is the open base for the Docker container platform, as well as examples of container systems using various components from the Moby library or from other projects."

Who needs to know about Moby?

The first group that needs to know about Moby is Docker developers, as in the people building the actual Docker software, and not people building applications using Docker containers, or even people building Docker containers.  (Here's hoping that eventually this nomenclature gets cleared up.)  Docker developers should just continue on as usual, and Docker pull requests will be reouted to the Moby project.
So everyone else is off the hook, right?
Well, um, no.
If all you do is pull together containers from pre-existing components and software you write yourself, then you're good; you don't need to worry about Moby. Unless, that is, you aren't happy with your available Linux distributions.
Enter LinuxKit.

What is LinuxKit?

While many think that Docker invented the container, in actuality linux containers had been around for some time, and Docker containers are based on them.  Which is really convenient -- if you're using Linux.  If, on the other hand, you are using a system that doesn't include Linux, such as a Mac, a Windows PC, or that Raspberry Pi you want to turn into an automatic goat feeder, you've got a problem.
Docker requires linuxcontainers.  Which is a problem if you have no linux.
Enter LinuxKit.  
The idea behind LinuxKit is that you start with a minimal Linux kernal -- the base distro is only 35MB -- and add literally only what you need. Once you have that, you can build your application on it, and run it wherever you need to.  Stephen Foskitt tweeted a picture of an example from the announcement:
The end result is that you can build containers that run on desktops, mainframes, bare metal, IoT, and VMs.
The project will be managed by the Linux Foundation, which is only fitting.
So what about Alpine, the minimal Linux that's at the heart of Docker?  Docker's security director, Nathan McCauley said that "LinuxKit's roots are in Alpine."  The company will continue to use it for Docker.
So what does this have to do with Moby?

Where LinuxKit has to do with Moby

If you're salivating at the idea of building your own Linux distribution, take a deep breath. LinuxKit is an assembly within Moby.  
So if you want to use LinuxKit, you need to download and install Moby, then use it to build your LinuxKit pieces.
So there you have it. You now have the ability to build your own Linux system, and your own containerization system. But it's definitely not for the faint of heart.


Choose your cloud native journey.

Whatever your role, we’re here to help with open source tools and world-class support.



Cloud Native & Coffee

Subscribe to our bi-weekly newsletter for exclusive interviews, expert commentary, and thought leadership on topics shaping the cloud native world.