简体   繁体   中英

Is Docker native on Mesos OS X?

I notice that you can install Mesos natively on OS X.

Last time I looked into it Docker was not native on OS X, so how does Mesos run a Docker containers in OS X? Is a VM involved? Something like boot2docker?

Mesos uses cgroups with or without Docker on Linux, but the Mesos "containerization" on OS X only supports "posix" isolation, which will launch a task in a thread and monitor it for completion. There is no cgroups-style resource isolation, and no Docker image support. This is not a "production-recommended" Mesos setup, but some use it to test out Mesos on their laptops.

You could either a) run both Mesos and Docker inside a linux VM to get cgroups kernel support, or b) use boot2docker to build your images locally, then deploy them to a Linux-based Mesos cluster.

Since MacOS is based on BSD (not linux), it might be possible to create a new Mesos containerizer based on FreeBSD jails, but Docker doesn't support jails either.

Mesos itself does a lot of things unrelated to Docker: While there is support for containers (see http://mesos.apache.org/documentation/latest/docker-containerizer/ ), there is no direct dependency from Mesos to Docker. When you look at the architecture example (from http://mesos.apache.org/documentation/latest/mesos-architecture/ ): 文档中的mesos体系结构示例 you can see that neither the master nor any of the slaves do anything with Docker.

You can run Mesos master or slave nodes natively on OS X, but if you want to use Docker on any of the slaves running Mac OS you still rely on the normal Mac OS Docker workarounds (boot2docker etc.). This remains unchanged (see https://docs.docker.com/installation/mac/ ):

Because the Docker Engine uses Linux-specific kernel features, you'll need to use a lightweight virtual machine (VM) to run it on OS X.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM