2

When I first heard that Microsoft was working to run docker containers it didn't make sense.

For a while it seemed that Docker was Linux-centric, with its dependency on Linux Containers.

Now it seems Docker has switched from LXC to an implementation of the Open Containers Format (OCF) spec in runc.

My question is: Does the OCF spec mean that Docker is no longer Linux centric? (ie is that how this will work? Does that mean there exists the theoretical capability to do this on OSX as well?)

Community
  • 1
  • 1
hawkeye
  • 34,745
  • 30
  • 150
  • 304
  • Well, [Docker has been available on FreeBSD since June 2015](https://wiki.freebsd.org/Docker). It uses Jails in that context, so despite the 64-bit Linux compatibility layer, it's a pretty FreeBSD-ish implementation, not all that obstinately Linuxy. – kojiro Jan 02 '16 at 00:01

3 Answers3

5

There are a few points of interest here.

  1. Containers can only be supported natively on platforms that have support for OS virtualization. OSX (so far) does not have such a capability. So it cannot support containers natively. You have to use a VM.
  2. A standardized container format does not mean that the same container will be able to run on different platforms. The container and the host necessarily have to run on the same kernel. So a particular container can only run on a compatible platform.
  3. What the standardized container format specification does is to enable richer container ecosystem technology from varied sources, all able to interwork because of the standard container format. This technology still has to be implemented for each different host platform.
  4. Docker's adoption of OCF does not necessarily mean that it will automatically start targeting platforms other than Linux. It just means that the container format it will use on Linux will be the OCF instead of it's own proprietary format.
Ziffusion
  • 8,779
  • 4
  • 29
  • 57
  • Item 1 is simply not true. If you want containers, you need a host - hence the need for a linux VM to host linux containers on OSX. – Henk Langeveld Jan 01 '16 at 23:54
  • 1
    Item 4. Dockers runC is targeting support of multiple platforms. Windows being next in line. – Matt Jan 02 '16 at 00:07
  • @HenkLangeveld Item 1 says `natively`. What that means is supporting containers directly on the native OS without the use of a VM. I am not sure what you are getting at. Containers can only be supported `natively` on platforms that support OS virtualization. Else you have to use a VM. And that is not `native` containers. – Ziffusion Jan 02 '16 at 00:11
  • @Ziffusion Containers are not exclusive to linux. Microsoft now offers containers for Windows, and Solaris had containers at the turn of the century. Cross-platform containers are rare and except for Joyent will require a VM. With OSX being the developer platform of choice, it requires a linux VM in order to run linux containers. Then again, OSX might add support to run OSX apps in native containers. – Henk Langeveld Jan 02 '16 at 11:05
3

+1 to Ziffusion. You might want to reword Item 1), but basically you are correct on all four points.

To answer the OP's question: I do not believe OCF "deprecates" Linux. On the contrary, I believe it better supports Linux AND, AT THE SAME TIME, opens Docker functionality to better support other OS's, too.

Specifically:

https://www.opencontainers.org/faq

In the past two years, there has been rapid growth in both interest in and usage of container-based solutions. Almost all major IT vendors and cloud providers have announced container-based solutions, and there has been a proliferation of start-ups founded in this area as well. While the proliferation of ideas in this space is welcome, the promise of containers as a source of application portability requires the establishment of certain standards around format and runtime. While the rapid growth of the Docker project has served to make the Docker image format a de facto standard for many purposes, there is widespread interest in a single, open container specification, which is:

a) not bound to higher level constructs such as a particular client or orchestration stack,

b) not tightly associated with any particular commercial vendor or project, and

c) portable across a wide variety of operating systems, hardware, CPU architectures, public clouds, etc.

The FAQ further states:

What are the values guiding the specification?

  • Composable. All tools for downloading, installing, and running containers should be well integrated, but independent and composable. Container formats and runtime should not be bound to clients, to higher level frameworks, etc.

  • Portable: The runtime standard should be usable across different hardware, operating systems, and cloud environments.

  • Open. The format and runtime should be well-specified and developed by a community. We want independent implementations of tools to be able to run the same container consistently. ...

paulsm4
  • 114,292
  • 17
  • 138
  • 190
1

The Open Container Initiative is a working towards making a container format and a runtime that can run on many platforms, although a lot of the concepts and requirements will be based on the linux foundation they have been built from. An OCF container still specifies a platform so don't expect to be able to execute a Windows container on a Linux host. But expect to be able to manage Linux and Windows and "Y" containers in the same manner and ecosystem.

Docker moved away from LXC a while ago, to using libcontainer which is still linux centric. runC is the next runtime that is already able to run current docker containers on Linux, but aims to support the Open Container Format spec on many platforms.

The goal of runC is to make standard containers available everywhere

Linux, obviously, has been building up the OS features to support containers over the last 10 years. Microsoft has included a lot of the OS components in Windows 10 to run containers natively and has thrown support behind docker. So expect runC to be running on Windows soon.

BSD does support a lot of the functionality via it's Jails setup but never matured as much as the Linux space so I believe additional OS support will be required for it, or OSX to be able to run an OCF container natively. Although recent FreeBSD 11 does allow you to run Docker via it's 64bit Linux compatibility layer so I'm guessing runC would be close to doing the same, at some possible performance cost.

Matt
  • 68,711
  • 7
  • 155
  • 158