{"id":415,"date":"2014-07-14T00:38:54","date_gmt":"2014-07-13T15:38:54","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2014\/07\/14\/docker_docker_ry\/"},"modified":"2014-07-14T00:38:54","modified_gmt":"2014-07-13T15:38:54","slug":"docker_docker_ry","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2014\/07\/14\/docker_docker_ry\/","title":{"rendered":"Docker Docker \u3046\u308b\u3055\u3044\uff01 \u4ee5\u4e0b(ry"},"content":{"rendered":"<p>\u6700\u8fd1\u5df7\u3067\u3001\u30c9\u30ab\u30c9\u30ab\u3046\u308b\u3055\u3044\u306e\u3067\u3001\u5b50\u4f9b\u3060\u307e\u3057\u306e\u30e2\u30f3\u30ad\u30fc\u30d3\u30b8\u30cd\u30b9\u3058\u3083\u306a\u3044\u3060\u308d\u3046\u306a\u3068\u3001\u8a66\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3059\u308b\u3002<\/p>\n<p><iframe loading=\"lazy\" height=\"157\" src=\"\/\/www.youtube.com\/embed\/j-cNNCiMXgk\" frameborder=\"0\" width=\"210\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>\u305d\u3082\u305d\u3082\u3001Docker\u3068\u306f\u306a\u3093\u305e\u3084\u3068\u3002<\/p>\n<p><a href=\"http:\/\/knowledge.sakura.ad.jp\/tech\/1811\/\">\u3053\u308c\u304b\u3089\u59cb\u3081\u308b\u300cDocker\u3067\u304b\u3093\u305f\u3093LAMP\u74b0\u5883 for CentOS\u300d<\/a><\/p>\n<p>\u306b\u3042\u308b\u3001\u4ee5\u4e0b\u306e\u56f3\u304c\u3059\u3054\u304f\u308f\u304b\u308a\u3084\u3059\u3044\u3002<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker_13CCB\/docker-immutable-infrastructure-2.png\"><img loading=\"lazy\" decoding=\"async\" title=\"docker-immutable-infrastructure-2\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"docker-immutable-infrastructure-2\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Docker_13CCB\/docker-immutable-infrastructure-2_thumb.png\" width=\"338\" height=\"165\" \/><\/a><\/p>\n<blockquote>\n<p>Docker\u306f\u3001LXC(Linux Container)\u3068\u3044\u3046Linux\u306e\u30b3\u30f3\u30c6\u30ca\u6280\u8853\u3092\u7528\u3044\u3066\u3001\u30b5\u30fc\u30d0\u30fc\u4e0a\u306b\u72ec\u7acb\u3057\u305fOS\u74b0\u5883\u3092\u4f5c\u308c\u308b\u3082\u306e\u3067\u3001OS\u74b0\u5883\u3092\u4fdd\u5b58\u3057\u3066\u304a\u3044\u305f\u308a\u3001\u4ed6\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u7a3c\u50cd\u3055\u305b\u305f\u308a\u3068\u3001\u67d4\u8edf\u306a\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u30b3\u30f3\u30c6\u30ca\u6280\u8853\u306f\u4eee\u60f3\u5316\u6280\u8853\u3068\u540c\u5217\u8996\u3055\u308c\u307e\u3059\u304c\u3001KVM\u3084Xen\u306a\u3069\u306e\u5b8c\u5168\u4eee\u60f3\u5316\u3068\u306f\u5168\u304f\u7570\u306a\u308b\u3082\u306e\u3067\u3059\u3002KVM\u3084Xen\u306a\u3069\u304c\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306e\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u884c\u3063\u3066\u30db\u30b9\u30c8\u3068\u306f\u7570\u306a\u308bOS\u7a7a\u9593\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u306b\u5bfe\u3057\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u5834\u5408\u306f\u5358\u4e00\u306eOS\u3092\u898b\u304b\u3051\u4e0a\u5206\u5272\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3001\u30db\u30b9\u30c8\u5074\u3067ps\u3092\u884c\u3046\u3068\u30b2\u30b9\u30c8\u306e\u30d7\u30ed\u30bb\u30b9\u3082\u542b\u3081\u3066\u5168\u3066\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u308f\u304b\u308a\u3084\u3059\u3044\uff01<\/p>\n<p>\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u578b\u306e\u4eee\u60f3\u5316\u306b\u304f\u3089\u3079\u3066\u3001\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u5c11\u306a\u305d\u3046\u306a\u306e\u3067\u3001\u4eee\u60f3\u74b0\u5883\u306e\u30b2\u30b9\u30c8OS\u306b\u69cb\u7bc9\u3057\u305f\u308a\u3001\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u69cb\u7bc9\u3057\u305f\u308a\u3068\u3001\u7528\u9014\u304c\u5e83\u305d\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<a href=\"https:\/\/www.typea.info\/blog\/index.php\/2014\/07\/10\/centos_7_hyper-v\">CentOS 7 \u3092 Hyper-V \u74b0\u5883\u306b\u7528\u610f\u3057\u305f<\/a>\u306e\u3067\u3001\u4ee5\u4e0b\u3092\u78ba\u8a8d\u3057\u306a\u304c\u3089\u3001CentOS7\u3078\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u308b\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><a title=\"https:\/\/docs.docker.com\/\" href=\"https:\/\/docs.docker.com\/\">https:\/\/docs.docker.com\/<\/a><\/p>\n<p><a title=\"https:\/\/docs.docker.com\/installation\/centos\/\" href=\"https:\/\/docs.docker.com\/installation\/centos\/\">https:\/\/docs.docker.com\/installation\/centos\/<\/a><\/p>\n<h2>1.Docker\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<h3>1.1 Docker\u30d1\u30c3\u30b1\u30fc\u30b8<\/h3>\n<p>Docker \u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001<a href=\"https:\/\/fedoraproject.org\/wiki\/EPEL\/ja\">\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba Linux\u7528\u62e1\u5f35\u30d1\u30c3\u30b1\u30fc\u30b8(EPEL)<\/a> \u30ea\u30dd\u30b8\u30c8\u30ea\u7d4c\u7531\u3067\u5165\u624b\u51fa\u6765\u304d\u308b\u3002<\/p>\n<p>Docker\u3092\u52d5\u304b\u3059\u306b\u306f\u3001CentOS 6 \u4ee5\u964d\u3001\u30ab\u30fc\u30cd\u30eb\u30d0\u30fc\u30b8\u30e7\u30f3 2.6.32-431 \u4ee5\u964d\u304c\u5fc5\u8981\u3002<\/p>\n<p>&#160;<\/p>\n<h3>1.2 EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u6e96\u5099<\/h3>\n<p><a href=\"https:\/\/fedoraproject.org\/wiki\/EPEL#How_can_I_use_these_extra_packages.3F\">\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba Linux\u7528\u62e1\u5f35\u30d1\u30c3\u30b1\u30fc\u30b8(EPEL) \u30ea\u30dd\u30b8\u30c8\u30ea \u304c\u6709\u52b9\u5316\u3092\u307e\u305a\u78ba\u8a8d\u3059\u308b<\/a><\/p>\n<p>\u4ee5\u4e0b\u3042\u305f\u308a\u304b\u3089\u3001epel-release \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u63a2\u3059<\/p>\n<p><a title=\"https:\/\/fedoraproject.org\/wiki\/EPEL#How_can_I_use_these_extra_packages.3F\" href=\"https:\/\/fedoraproject.org\/wiki\/EPEL#How_can_I_use_these_extra_packages.3F\">https:\/\/fedoraproject.org\/wiki\/EPEL#How_can_I_use_these_extra_packages.3F<\/a><\/p>\n<p><a title=\"http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/repoview\/epel-release.html\" href=\"http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/repoview\/epel-release.html\">http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/repoview\/epel-release.html<\/a><\/p>\n<p>RPM\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/p>\n<p><a title=\"http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/epel-release-7-0.2.noarch.rpm\" href=\"http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/epel-release-7-0.2.noarch.rpm\">http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/epel-release-7-0.2.noarch.rpm<\/a><\/p>\n<pre class=\"prettyprint linenums\"># wget http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/Fedora\/epel\/beta\/7\/x86_64\/epel-release-7-0.2.noarch.rpm\r\n# rpm -Uvh epel-release-7-0.2.noarch.rpm \r\n\u8b66\u544a: epel-release-7-0.2.noarch.rpm: \u30d8\u30c3\u30c0\u30fc V3 RSA\/SHA256 Signature\u3001\u9375 ID 352c64e5: NOKEY\r\n\u6e96\u5099\u3057\u3066\u3044\u307e\u3059...              ################################# [100%]\r\n\u66f4\u65b0\u4e2d \/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d...\r\n   1:epel-release-7-0.2               ################################# [100%]<\/pre>\n<p>&#160;<\/p>\n<h4>1.3 Docker-io \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>docker-io \u30d1\u30c3\u30b1\u30fc\u30b8\u306f EPEL \u306e Docker \u304b\u3089\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b<\/p>\n<p>\u3059\u3067\u306b\u3001docker \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001docker-io \u3068\u885d\u7a81\u3059\u308b\u3002\u5148\u306bdocker\u3092\u524a\u9664\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"prettyprint linenums\"># yum install docker-io\r\n         :\r\n--&gt; \u4f9d\u5b58\u6027\u89e3\u6c7a\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\r\n\r\n\u4f9d\u5b58\u6027\u3092\u89e3\u6c7a\u3057\u307e\u3057\u305f\r\n\r\n==========================================================================================================================\r\n Package                       \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc           \u30d0\u30fc\u30b8\u30e7\u30f3                       \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc              \u5bb9\u91cf\r\n==========================================================================================================================\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d:\r\n docker-io                     x86_64                     1.0.0-1.el7                      epel                     4.5 M\r\n\r\n\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u8981\u7d04\r\n==========================================================================================================================\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb  1 \u30d1\u30c3\u30b1\u30fc\u30b8\r\n\r\n\u7dcf\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5bb9\u91cf: 4.5 M\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5bb9\u91cf: 23 M\r\n       :\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:\r\n  docker-io.x86_64 0:1.0.0-1.el7                                                                                          \r\n\r\n\u5b8c\u4e86\u3057\u307e\u3057\u305f!<\/pre>\n<p>&#160;<\/p>\n<h4>1.4 Docker \u30c7\u30fc\u30e2\u30f3\u306e\u958b\u59cb<\/h4>\n<p>CentOS7 \u3067\u306f\u3001\u5f93\u6765\u306e service\u3001chkconfig \u30b3\u30de\u30f3\u30c9\u306b\u5909\u308f\u3063\u3066\u3001systemctl \u30b3\u30de\u30f3\u30c9\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u308b\u3093\u3067\u3059\u306d\u3002chkconfig \u2013list \u3057\u305f\u3089\u3001\u898b\u6163\u308c\u306a\u3044\u30b3\u30e1\u30f3\u30c8\u304c\u51fa\u3066\u304d\u3066\u9a5a\u304d\u307e\u3057\u305f\u3002<\/p>\n<div style=\"margin-bottom: 5px\">\u4eca\u5f8c\u3001\u304a\u3064\u304d\u3042\u3044\u3057\u3066\u3044\u304f\u3053\u3068\u306b\u306a\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u7167\u3057\u3001\u6982\u8981\u3092\u3064\u304b\u3080\u3002<\/div>\n<p><a href=\"http:\/\/d.hatena.ne.jp\/enakai00\/20130914\/1379146157\">Systemd\u5165\u9580<\/a><\/p>\n<pre class=\"prettyprint linenums\"># systemctl start  docker.service<\/pre>\n<h4>1.5 \u30b7\u30b9\u30c6\u30e0\u8d77\u52d5\u6642\u306b\u3001Docker\u3082\u8d77\u52d5\u3059\u308b\u3088\u3046\u8a2d\u5b9a<\/h4>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306f\u3001\/usr\/lib\/systemd\/system\/docker.service<\/p>\n<p>\u30e9\u30f3\u30ec\u30d9\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e WantedBy= \u3092\u9069\u5b9c\u5909\u66f4<\/p>\n<pre class=\"prettyprint linenums\"># systemctl enable docker.service<\/pre>\n<h4>2.\u8a66\u3059<\/h4>\n<h4>2.1 \u6700\u65b0\u306eCentOS\u30a4\u30e1\u30fc\u30b8\u306e\u53d6\u5f97<\/h4>\n<pre class=\"prettyprint linenums\"># docker pull centos:latest\r\nPulling repository centos                 \r\n1a7dc42f78ba: Download complete           \r\n511136ea3c5a: Download complete                                    \r\n34e94e67e63a: Download complete  <\/pre>\n<p>&#160;<\/p>\n<h4>2.2 bash \u30b7\u30a7\u30eb\u3092\u8d77\u52d5\u3057\u3066\u307f\u308b<\/h4>\n<pre class=\"prettyprint linenums\"># docker run -i -t centos \/bin\/bash\r\nbash-4.2# ls<\/pre>\n<p>&#160;<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u7c21\u5358\u306a\u78ba\u8a8d\u306f\u5b8c\u4e86\uff01<\/p>\n<p>\u3055\u3066\u3001\u3069\u3046\u904a\u307c\u3046\u304b\u3002<\/p>\n<p>&#160;<\/p>\n<p>&#160;<\/p>\n<p><iframe style=\"height: 240px; width: 120px\" marginheight=\"0\" src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=FFFFFF&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=typea09-22&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=ss_til&amp;asins=B00JWM4W2E\" frameborder=\"0\" marginwidth=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5df7\u3067\u3001\u30c9\u30ab\u30c9\u30ab\u3046\u308b\u3055\u3044\u306e\u3067\u3001\u5b50\u4f9b\u3060\u307e\u3057\u306e\u30e2\u30f3\u30ad\u30fc\u30d3\u30b8\u30cd\u30b9\u3058\u3083\u306a\u3044\u3060\u308d\u3046\u306a\u3068\u3001\u8a66\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3059\u308b\u3002 \u305d\u3082\u305d\u3082\u3001Docker\u3068\u306f\u306a\u3093\u305e\u3084\u3068\u3002 \u3053\u308c\u304b\u3089\u59cb\u3081\u308b\u300cDocker\u3067\u304b\u3093\u305f\u3093LAMP\u74b0\u5883 for CentOS\u300d  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[64,75],"tags":[],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-centos","category-docker"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}