1:HL["/_next/static/css/e0b87381b78a72d0.css",{"as":"style"}] 0:["00Nw3V7p6jjR7VBCI9FoH",[[["",{"children":["blog",{"children":[["slug","2016/02/22/install-dlite","c"],{"children":["__PAGE__?{\"slug\":[\"2016\",\"02\",\"22\",\"install-dlite\"]}",{}]}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/e0b87381b78a72d0.css","precedence":"next"}]],"$L3"]]]] 4:I{"id":4896,"chunks":["896:static/chunks/896-da17be67249e7703.js","797:static/chunks/app/blog/[...slug]/page-a20797c105738917.js"],"name":"","async":false} 5:I{"id":3466,"chunks":["272:static/chunks/webpack-a5603073f1184a0b.js","253:static/chunks/bce60fc1-3138fc63e84359d9.js","961:static/chunks/961-177df6473dc74d43.js"],"name":"default","async":false} 6:I{"id":372,"chunks":["272:static/chunks/webpack-a5603073f1184a0b.js","253:static/chunks/bce60fc1-3138fc63e84359d9.js","961:static/chunks/961-177df6473dc74d43.js"],"name":"default","async":false} 2:[["$","html",null,{"lang":"ja","children":["$","body",null,{"children":[["$","header",null,{"children":["$","h1",null,{"id":"site-title","children":["$","$L4",null,{"href":"/","children":"apatheia.info"}]}]}],["$","main",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":["$","div",null,{"children":[["$","h2",null,{"children":"Not Found"}],["$","p",null,{"children":"Could not find requested resource"}],["$","p",null,{"children":["View ",["$","$L4",null,{"href":"/","children":"all posts"}]]}]]}],"notFoundStyles":[],"childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","blog","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","blog","children",["slug","2016/02/22/install-dlite","c"],"children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$L7",null],"segment":"__PAGE__?{\"slug\":[\"2016\",\"02\",\"22\",\"install-dlite\"]}"},"styles":[]}],"segment":["slug","2016/02/22/install-dlite","c"]},"styles":[]}],"segment":"blog"},"styles":[]}]}],["$","footer",null,{"children":["$","ul",null,{"children":[["$","li",null,{"children":"Link:"}],["$","li",null,{"children":["$","a",null,{"href":"https://twitter.com/f440","children":"Twitter"}]}],["$","li",null,{"children":["$","a",null,{"href":"https://github.com/f440","children":"Github"}]}],["$","li",null,{"children":["$","a",null,{"href":"https://pinbaord.in/u:f440","children":"Pinbaord"}]}]]}]}]]}]}],null] 3:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"DLiteでOS X上にDockerの環境を構築する - aptheia.info"}],["$","meta","2",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","3",{"rel":"alternate","type":"application/rss+xml","href":"/atom.xml"}]] 8:Ta4c,

DLite をインストールしたので、そのときのメモ。

DLiteとは

OS XでDockerを使えるようにやつ。内部ではxhyveを使っていて非常にコンパクト。

作業環境

インストール手順

brew install dlite
sudo dlite install # CPUやディスクサイズなどのオプションは`-h`で確認可能

おしまい。

内部では以下が行われる:

起動

Tmux内で起動しようとするとエラーになるので、必ずTmux外でやること。

dlite start

問題がなければ以下が加えられる:

うまくいっていれば、docker -H unix://var/run/docker.sock(export DOCKER_HOST=unix:///var/run/docker.sockで指定も可)でdockerが使えるようになる。

もしうまくいかないようなら、sudo dlite daemonでコマンドラインから実行して原因を突き止める。とくに、NFS周りのコンフリクトが起きていないかを確認。

まとめ

ホストと仮想環境の間がシームレスにつながってcoLinuxっぽさがある。こういうすっきりしたツールは楽しい。

追記

2016-05-08: 現在はDocker for Macを利用している。osxfsでファイルシステムのイベントが連携できて便利。

参考

7:["$","article",null,{"children":[["$","h1",null,{"children":"DLiteでOS X上にDockerの環境を構築する"}],["$","p",null,{"id":"article-info","children":["2016.02.22"," ",[["$","span","docker",{"children":[["$","$L4",null,{"href":"/blog/categories/docker","children":"docker"}]," "]}]]]}],["$","div",null,{"dangerouslySetInnerHTML":{"__html":"$8"}}]]}]