{"id":1893,"date":"2015-07-03T22:46:56","date_gmt":"2015-07-03T13:46:56","guid":{"rendered":"http:\/\/mattyan.net\/blog\/?p=1893"},"modified":"2015-07-03T22:46:56","modified_gmt":"2015-07-03T13:46:56","slug":"docker%e3%81%abunix%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e7%b5%8c%e7%94%b1%e3%81%a7%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/mattyan.net\/blog\/?p=1893","title":{"rendered":"docker\u306bUnix\u30c9\u30e1\u30a4\u30f3\u30bd\u30b1\u30c3\u30c8\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p>docker\u306e\u52d5\u4f5c\u4e2d\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u53d6\u5f97\u3059\u308b\u306e\u306b\u3001docker ps\u304b\u3089\u30b4\u30cb\u30e7\u30b4\u30cb\u30e7\u3084\u3063\u3066\u308b\u3068\u9762\u5012\u304f\u3055\u305d\u3046\u3060\u3063\u305f\u304b\u3089\u3001Unix\u30c9\u30e1\u30a4\u30f3\u30bd\u30b1\u30c3\u30c8\u3067API\u53e9\u3044\u3066\u307f\u305f\u3002<br \/>\n<!--more--><br \/>\n[bash]<br \/>\npacman -S socat<br \/>\n[\/bash]<br \/>\n\u3067socat\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066<br \/>\n[bash]<br \/>\necho -en &#8216;GET \/containers\/json?status=running HTTP\/1.1\\r\\n\\r\\n&#8217; | socat stdio \/var\/run\/docker.sock<br \/>\n[\/bash]<br \/>\n\u3067API\u53e9\u3044\u305f\u3089<\/p>\n<pre>\nHTTP\/1.1 200 OK\nContent-Type: application\/json\nDate: Fri, 03 Jul 2015 13:36:56 GMT\nContent-Length: 390\n[{\"Id\":\"4169d4028d0dff7565be1929b9c77622e20e9d16138f61a3424327acd5b14e3b\",\"Names\":[\"\/happy_mccarthy\"],\"Image\":\"mattyan\/bitbucket\",\"Command\":\"\/usr\/share\/tomcat8\/bin\/catalina.sh run\",\"Created\":1435925859,\"Ports\":[{\"IP\":\"0.0.0.0\",\"PrivatePort\":10020,\"PublicPort\":10020,\"Type\":\"tcp\"},{\"IP\":\"0.0.0.0\",\"PrivatePort\":8080,\"PublicPort\":8080,\"Type\":\"tcp\"}],\"Labels\":{},\"Status\":\"Up About an hour\"}]\n<\/pre>\n<p>\u305d\u308c\u3063\u307d\u3044\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u8fd4\u3063\u3066\u304d\u305f\u304b\u3089\u3001\u3053\u308c\u3092python\u304b\u4f55\u304b\u306b\u98df\u308f\u305b\u3066\u30b4\u30cb\u30e7\u30b4\u30cb\u30e7\u3059\u308c\u3070\u3088\u3055\u305d\u3046\u3002<br \/>\ndocker\u306eAPI\u306f<a href=\"https:\/\/docs.docker.com\/reference\/api\/docker_remote_api_v1.19\/\">\u3053\u3053<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>docker\u306e\u52d5\u4f5c\u4e2d\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u53d6\u5f97\u3059\u308b\u306e\u306b\u3001docker ps\u304b\u3089\u30b4\u30cb\u30e7\u30b4\u30cb\u30e7\u3084\u3063\u3066\u308b\u3068\u9762\u5012\u304f\u3055\u305d\u3046\u3060\u3063\u305f\u304b\u3089\u3001Unix\u30c9\u30e1\u30a4\u30f3\u30bd\u30b1\u30c3\u30c8\u3067API\u53e9\u3044\u3066\u307f\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1],"tags":[],"class_list":["post-1893","post","type-post","status-publish","format-standard","hentry","category-3","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1893"}],"version-history":[{"count":0,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1893\/revisions"}],"wp:attachment":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}