LoginSignup
8
6

More than 5 years have passed since last update.

Docker without Linux

Last updated at Posted at 2014-12-18

この記事は Docker Advent Calendar 2014 の19日目の記事です。先日は @hideyuki さんの Docker Compose を試す でした。


2014年は Docker Engine のクロスプラットフォーム対応が進んだ年でした。2月にリリースされた Docker 0.8 では

Docker 0.8: Quality, new builder features, btrfs, OSX support

Starting with version 0.8, Docker is officially supported on Mac OSX. This allows sysadmins and developers to build and run Linux applications as Docker containers, directly on their Mac machine.

と OS X がサポートされ、11月には Microsoft の Ahmet Alp Balkan 氏による Windows port of Docker Client というプルリクエストが

This pull request contains the set of changes to compile and get the Docker client working on Microsoft Windows.

無事 master にマージされました。

しかし、これらの変更はすべて Docker Engine のクライアント側を Linux 以外の OS に対応させるためのものです。Docker Engine のサーバー側を Linux 以外の OS で動かすことは不可能なのでしょうか?

Windows

10月に発表された Microsoft とのパートナーシップでは、Docker Engine のサーバー側を Windows で動かすための取り組みについて触れられています。

Docker and Microsoft Partner to Drive Adoption of Distributed Applications to Every Enterprise Operating System and Cloud

  1. A Microsoft led initiative to add container capabilities (e.g. the equivalent of namespaces and cgroups) to Windows

  2. A new Docker Windows Daemon, which will be built in open source under the aegis and governance of the Docker project, with input from Microsoft, Docker, Inc, and the broader Docker community

  3. The overall Docker platform, which will also be extended (in the open) to support both the Docker Windows Daemon and the Docker Linux Daemon.

ここで言及されている "container capabilities" について、Microsoft Research の Drawbridge を思い出す方もいるかもしれません。しかし Microsoft の Jason Zander 氏は WIRED の取材に対してなにか別のテクノロジーの存在を示唆しています。

Microsoft Says Windows Will Run Docker, the Next Big Thing in Cloud Computing

Microsoft has published a research paper detailing a cgroups-like technology called “Drawbridge,” but Zander seems to indicate that Microsoft will include a different container technology with Windows Server.

いまのところ、ここで言及されている "a different container technology" についての詳細、および Docker Windows Daemon の実装は公開されていません。

SmartDataCenter

Joyent の公開している sdc-docker は、バックエンドに同社のプライベートクラウド管理プラットフォームである SmartDataCenter を使った、Docker Engine のサーバー実装です。

オリジナルの Docker Engine とは完全に別物で、JavaScript で書かれています。

A Docker Engine for SmartDataCenter, where the whole DC is exposed as a single docker host. The Docker remote API is served from a 'docker' core SDC zone (built from this repo).

SmartDataCenter が使っている SmartOS は、OpenSolaris から派生した illumos をベースにしています。

Overview of SmartDataCenter

SmartDataCenter uses SmartOS as its core operating environment and virtualization layer. SmartOS is a live-image distribution of Illumos, KVM and extras.

さらに Joyent から発表されたプレスリリースを読むと

Joyent Announces Linux Branded Zones and Extension of Docker Engine to SmartDataCenter, Provides a New Platform to Run Docker Securely with Bare Metal Performance

The open source initiatives announced today, Linux Branded Zones (LXz) and the extension of Docker Engine to SmartDataCenter, will deliver proven, multi-tenant security and bare metal performance to Linux applications running in Docker application containers.

(...)

Leveraging LXz, each infrastructure container is given its own virtualized network stack, consistent with the network topologies deployed in most enterprises today. LXz also delivers containers a persistence layer based upon the ZFS file system, making the management of multi-container application environments secure, robust and simple. LXz is being developed in the open, is available for beta usage today, and will become broadly available in the first quarter of 2015.

sdc-docker は、SmartDataCenter という大きな中間層をはさんで、最終的には Solaris Zones と ZFS を使っているものと思われます。

(まだ全体を把握できていません)

FreeBSD

筆者は、Docker Engine のサーバー側を FreeBSD で動かす作業に取り組んでいます。これについては、以前に Docker Meetup Tokyo #3 でも発表させていただきました。

すでに いくつかの変更は master にとりこまれています が、まだ単体テストも完走しない状況なので、先は長そうです。

一方で、Docker Engine 自体の ZFS 対応は zfs-utils based zfs graph driver で進んでいます。このグラフドライバーは zfs-utils という CLI ツール経由で ZFS を操作しているため、FreeBSD でも簡単に動かせるのではないかと期待しています。

まとめ

  • Docker Engine のクライアント側は様々な OS で動いていますが、サーバー側は Linux でしか動きません。
  • Windows への移植は Microsoft が取り組んでいます。
  • Solaris への移植は存在しませんが、SmartDataCenter という OpenSolaris をベースにしたプライベートクラウド製品には、JavaScript で実装された、Docker Engine 互換のサーバーがあります。
  • FreeBSD への移植は筆者が取り組んでいますが、まだ先は長そうです。ZFS むけのグラフドライバーはプルリクエストが存在します。

明日は @orita さんです。

8
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6