Raspberry Pi 2でdocker

dockerを触ってみたくなったので、Raspberry Pi 2で動かす

ぐぐったらすぐ出てきた [Raspberry Pi]ラズパイ2でDockerコンテナを実行する

hypriotというOSイメージを使うらしい
http://blog.hypriot.com/downloads/

ちょうど2日前にバージョン1.0.0が出たようですね。これを使います。

イメージを解凍して焼きこむ

$ diskutil unmountdisk /dev/disk3
$ sudo dd if=hypriotos-rpi-v1.0.0.img of=/dev/rdisk3 bs=1m
Password:
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 85.370542 secs (12282644 bytes/sec)

ログイン

で、wifiを有効化しようと、キーボードとモニターを繋いでログインしようとしたところ、問題発生。
user: root
password: hypriot
でログイン出来ません

ブログを見たところ、ユーザは pirate になってました

wifi設定

前回の記事と同じようにすればできます

sshログイン

wifiが繋がるようになったので、Macからsshでログインしてdocker runしてみます
avahi-daemonが有効化されているので black-pearl.localで繋がる様子

$ ssh pirate@black-pearl.local
The authenticity of host 'black-pearl.local (192.168.0.9)' can't be established.
ECDSA key fingerprint is SHA256:t8/aUUxPSN13NQid2vKuaX/hy7fmsnPnp8EtHzNgR9I.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'black-pearl.local' (ECDSA) to the list of known hosts.
Warning: the ECDSA host key for 'black-pearl.local' differs from the key for the IP address '192.168.0.9'
Offending key for IP in /Users/junzzz/.ssh/known_hosts:20
Are you sure you want to continue connecting (yes/no)? yes
pirate@black-pearl.local's password:

HypriotOS (Debian GNU/Linux 8)

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jul  3 18:57:42 2014
HypriotOS/armv7: pirate@black-pearl in ~

でdocker run

$ docker run -d -p 80:80 hypriot/rpi-busybox-httpd
Unable to find image 'hypriot/rpi-busybox-httpd:latest' locally
latest: Pulling from hypriot/rpi-busybox-httpd
c74a9c6a645f: Pull complete
6f1938f6d8ae: Pull complete
e1347d4747a6: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:c00342f952d97628bf5dda457d3b409c37df687c859df82b9424f61264f54cd1
Status: Downloaded newer image for hypriot/rpi-busybox-httpd:latest
cd17c05ed59ea85ec36d949089a73f60d43c44683cef773f04accd09f3de660a

ブラウザで見れたら成功