{"id":437,"date":"2020-06-02T12:00:51","date_gmt":"2020-06-02T03:00:51","guid":{"rendered":"https:\/\/blog.hgrs.me\/?p=437"},"modified":"2020-06-02T11:02:47","modified_gmt":"2020-06-02T02:02:47","slug":"raspberry-pi-%e3%81%ab-docker-%e3%81%a8-docker-compose-%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.hgrs.me\/archives\/437.html","title":{"rendered":"Raspberry Pi \u306b Docker \u3068 Docker Compose \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"
\u30e9\u30ba\u30d1\u30a4\u306e\u74b0\u5883\u69cb\u7bc9\u306e\u4e00\u74b0\u3067 Docker \u5468\u308a\u306e\u74b0\u5883\u3092\u7528\u610f\u3057\u305f\u306e\u3067\u3001\u8a18\u9332\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n
Docker \u306e\u516c\u5f0f\u306b\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n
$ curl -sSL https:\/\/get.docker.com | sh<\/code><\/pre>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u7d42\u308f\u3063\u305f\u3089 Docker \u306e\u30b3\u30de\u30f3\u30c9\u306e\u6a29\u9650\u3092\u30e6\u30fc\u30b6\u306b\u4e0e\u3048\u307e\u3059\u3002<\/p>\n
$ sudo usermod -aG docker <username><\/code><\/pre>\n\u4f8b\u3048\u3070\u3001\u30e6\u30fc\u30b6\u540d\u304c pi<\/code> \u306a\u3089\u3070 sudo usermod -aG docker pi<\/code> \u3068\u306a\u308a\u307e\u3059\u3002<\/p>\nDocker Compose<\/h2>\n
Docker Compose \u306f Python \u306e pip<\/code> \u3092\u4f7f\u3046\u3068\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002
\nPython \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u4eba\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002
\n\u307e\u305f\u3001\u516c\u5f0f\u3067\u306f\u74b0\u5883\u3092\u6c5a\u3055\u306a\u3044\u305f\u3081\u306b\u3001\u4eee\u60f3\u74b0\u5883\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\u307e\u305a\u3001\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n
$ sudo apt install libffi-dev<\/code><\/pre>\n\u6b21\u306b Docker Compose \u672c\u4f53\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n
$ pip install docker-compose<\/code><\/pre>\n\u304a\u308f\u308a\u306b<\/h2>\n
sudo apt install docker docker-compose<\/code> \u3067\u5168\u3066\u5165\u308b\u672a\u6765\u306f\u6765\u306a\u3044\u3093\u3067\u3059\u304b\u306d\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"\u306f\u3058\u3081\u306b \u30e9\u30ba\u30d1\u30a4\u306e\u74b0\u5883\u69cb\u7bc9\u306e\u4e00\u74b0\u3067 Docker \u5468\u308a\u306e\u74b0\u5883\u3092\u7528\u610f\u3057\u305f\u306e\u3067\u3001\u8a18\u9332\u3057\u3066\u304a\u304d\u307e\u3059\u3002 D…<\/p>\n","protected":false},"author":1,"featured_media":438,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[40],"_links":{"self":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/437"}],"collection":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/comments?post=437"}],"version-history":[{"count":0,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/437\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media\/438"}],"wp:attachment":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media?parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/categories?post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/tags?post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}