{"id":9682,"date":"2018-10-09T21:10:55","date_gmt":"2018-10-09T12:10:55","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9682"},"modified":"2018-11-25T13:47:45","modified_gmt":"2018-11-25T04:47:45","slug":"docker%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9682","title":{"rendered":"Docker\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>Docker\u306b\u3064\u3044\u3066\u306e\u52c9\u5f37\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<h2>Docker\u3068\u306f<\/h2>\n<p>Docker\u3068\u306f\u3001\u30b3\u30f3\u30c6\u30ca\u578b\u306e\u4eee\u60f3\u5316\u74b0\u5883\u3092\u63d0\u4f9b\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3002<\/p>\n<p>VMWare\u3001Virtual box\u3092\u306f\u3058\u3081\u3068\u3059\u308b\u30011\u53f0\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u4e2d\u306b\u8907\u6570\u306eOS\u3092\u5c0e\u5165\u3059\u308b\u4eee\u60f3\u5316\u6280\u8853\u306e\uff11\u3064\u3068\u3057\u3066\u6ce8\u76ee\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>Docker\u306e\u4eee\u60f3\u5316\u6280\u8853\u306e\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u306f\u3001\u901a\u5e38\u306e\u4eee\u60f3\u5316\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u30011\u53f0\u306eOS\u306e\u4e0a\u306b\u3001\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u3092\u4f7f\u3046\u3053\u3068\u3067\u8907\u6570\u306eOS\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u305f\u304c\u3001Docker\u306fOS\u306e\u90e8\u5206\u306f\u8907\u6570\u306e\u4eee\u60f3\u74b0\u5883\u3067\u5171\u6709\u3057\u3066\u5229\u7528\u3057\u3001\u305d\u306e\u4e0a\u306b\u5165\u3063\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3084\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306f\u4eee\u60f3\u74b0\u5883\u3054\u3068\u306b\u5206\u3051\u3066\u5229\u7528\u3059\u308b\u3002<br \/>\n\u3053\u306e\u305f\u3081\u3001\u4eee\u60f3\u74b0\u5883\u306eOS\u306e\u30d9\u30fc\u30b9\u90e8\u5206\u3092\u5171\u6709\u3057\u3066\u3044\u308b\u305f\u3081\u30ea\u30bd\u30fc\u30b9\u306b\u7121\u99c4\u304c\u306a\u3044\u305f\u3081\u52b9\u7387\u7684\u3067\u3042\u308b\u3002<br \/>\n\u307e\u305f\u3001\u7570\u306a\u308b\u74b0\u5883\u3092\u8907\u6570\u69cb\u7bc9\u3057\u305f\u308a\u3001\u30b3\u30d4\u30fc\u3001\u524a\u9664\u3057\u305f\u308a\u3059\u308b\u5834\u5408\u3082\u4ed6\u306e\u4eee\u60f3\u5316\u6280\u8853\u3068\u6bd4\u3079\u308b\u3068\u52b9\u7387\u7684\u306b\u3067\u304d\u308b\u3002<\/p>\n<p>\u4e00\u65b9\u3067\u30011\u53f0\u306b\u30de\u30b7\u30f3\u3067\u7570\u306a\u308bOS\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306fDocker\u306f\u9069\u5207\u306a\u65b9\u6cd5\u3067\u306f\u306a\u3044\u3002<br \/>\n\u540c\u3058OS\u306e\u8907\u6570\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u305f\u3044\u5834\u5408\u306b\u5411\u3044\u3066\u3044\u308b\u6280\u8853\u3067\u3042\u308b\u3002<\/p>\n<h2>\u306a\u305c\u4eee\u60f3\u5316\u6280\u8853\u304c\u5fc5\u8981\u306a\u306e\u304b\uff1f<\/h2>\n<p>\u76ee\u7684\u3068\u3057\u3066\u8907\u6570\u306eOS(\u4f8b\u3048\u3070WindowsPC\u3068Mac)\u3092\u4f7f\u7528\u3057\u305f\u3044\u3068\u304d\u306b\u3001\u4eee\u60f3\u5316\u6280\u8853\u304c\u306a\u3051\u308c\u3070OS\u3054\u3068\u306b\u8907\u6570\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30de\u30b7\u30f3\u3092\u8cfc\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u3053\u306e\u305f\u3081\u3001\u8907\u6570\u306e\u30de\u30b7\u30f3\u3092\u8cfc\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u4fa1\u683c\u304c\u591a\u304f\u304b\u304b\u308b\u3002<\/p>\n<p>\u7269\u7406\u7684\u306a\u30b9\u30da\u30fc\u30b9\u3082\u591a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>\u4e00\u65b9\u3067\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u30671\u53f0\u306e\u30de\u30b7\u30f3\u306b\u8907\u6570\u306eOS\u3092\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u5229\u7528\u8005\u304c\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u30671\u53f0\u306e\u30de\u30b7\u30f3\u3067\u8907\u6570\u306eOS\u3092\u5229\u7528\u3067\u304d\u308b\u3002<\/p>\n<p>\u3053\u306e\u305f\u3081\u30012\u53f0\u8cfc\u5165\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u4fa1\u683c\u3001\u8a2d\u7f6e\u30b9\u30da\u30fc\u30b9\u307e\u305f\u96fb\u6c17\u4ee3\u306a\u3069\u7bc0\u7d04\u3067\u304d\u308b\u3002<\/p>\n<p>\u4eee\u60f3\u5316\u6280\u8853\u306f\u30011\u53f0\u306e\u30de\u30b7\u30f3\u306e\u4e2d\u306b\u30e1\u30e2\u30ea\u3084CPU\u3001\u307e\u305f\u306f\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u306a\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u591a\u3081\u306b\u3042\u3063\u3066\u30011\u3064\u306e\u74b0\u5883\u3060\u3051\u3067\u306f\u4f59\u3063\u3066\u3044\u308b\u5834\u5408\u306b\u6709\u52b9\u306a\u6280\u8853\u3067\u3042\u308b\u3002<\/p>\n<h2>Docker\u3068\u306f\u3069\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u6709\u52b9\u306a\u306e\u304b<\/h2>\n<p>\u30b5\u30fc\u30d0\u3001\u3042\u308b\u3044\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u3001\u3042\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3059\u308b\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3088\u3046\u3068\u3059\u308b\u5834\u5408\u3001\u540c\u3058OS\u3067Docker\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u767a\u751f\u3057\u3001\u74b0\u5883\u304c\u8907\u96d1\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\nDOcker\u3092\u4f7f\u3063\u3066\u305d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5c02\u7528\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3089\u306e\u4f9d\u5b58\u95a2\u4fc2\u306f\u7121\u8996\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3042\u308b\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u306b\u3001\u52d5\u4f5c\u3057\u76f4\u3059\u3088\u3046\u306b\u305d\u306e\u4e0a\u306b\u3042\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5168\u3066\u30c1\u30a7\u30c3\u30af\u3001\u4fee\u6b63\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u5834\u5408\u3001Docker\u3092\u4f7f\u3063\u3066\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u74b0\u5883\u3054\u3068\u306b\u5206\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3042\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3059\u308b\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u74b0\u5883\u69cb\u7bc9\u4f5c\u696d\u3060\u3051\u3067\u3082\u624b\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u304c\u3001docker\u3092\u4f7f\u3048\u3070\u30a4\u30e1\u30fc\u30b8\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u7c21\u5358\u306b\u74b0\u5883\u69cb\u7bc9\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30b5\u30fc\u30d0\u6280\u8853\u3068\u3057\u3066\u3001\u30b5\u30fc\u30d0\u4e0a\u306b\u8907\u6570\u306e\u5f79\u5272\u3092\u6301\u3063\u305f\u30b5\u30fc\u30d0\u3092\u69cb\u7bc9\u3057\u305f\u3044\u5834\u5408\u306b\u3082\u5411\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u30dd\u30a4\u30f3\u30c8<\/h3>\n<p>\u69d8\u3005\u306a\u30b5\u30fc\u30d0\u4eee\u60f3\u5316\u6280\u8853\u306b\u304a\u3044\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u306fOS\u306b\u95a2\u3059\u308b\u90e8\u5206\u3092\u8907\u6570\u306e\u30b3\u30f3\u30c6\u30ca\u3067\u5171\u6709\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30b5\u30fc\u30d0\u3054\u3068\u306eOS\u306e\u305f\u3081\u306e\u9818\u57df\u304c\u4e0d\u8981\u306b\u306a\u308b\u305f\u3081\u3001\u305d\u306e\u3076\u3093\u30b5\u30fc\u30d0\u306e\u30ea\u30bd\u30fc\u30b9\u304c\u6709\u52b9\u306b\u6d3b\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u4ed6\u3001\u8a2d\u5b9a\u306e\u624b\u9593\u3082\u7701\u3051\u308b\u3002<\/p>\n<h2>Docker\u306f\u3069\u3093\u306a\u5834\u5408\u306b\u5411\u3044\u3066\u3044\u306a\u3044\u304b<\/h2>\n<p>Docker\u306f\u5358\u4e00\u306eOS\u306e\u4e0a\u3067\u306e\u8907\u6570\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u6280\u8853\u306a\u306e\u3067\u3001\u4f8b\u3048\u3070MacOS\u3068Windows\u30921\u53f0\u306e\u30de\u30b7\u30f3\u306b\u5165\u308c\u305f\u3044\u3068\u3044\u3046\u5834\u5408\u306f\u3001VMWARE\u3084VirtualBox\u3068\u3044\u3063\u305f\u30c4\u30fc\u30eb\u304c\u5411\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>Docker\u3068\u7af6\u5408\u3059\u308b\u6280\u8853<\/h2>\n<p>\u74b0\u5883\u69cb\u7bc9\u3067Virtual Box+Vagrant\u3084\u3001VMare\u3068\u7af6\u5408\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>Docker\u3092\u4f7f\u7528\u3059\u308b\u6d41\u308c<\/h2>\n<p>Docker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<p>Docker\u306e\u8d77\u52d5\u3001\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/p>\n<h3>\u30b3\u30de\u30f3\u30c9<\/h3>\n<p>docker image<br \/>\n\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306eDocker\u30a4\u30e1\u30fc\u30b8\u3092\u78ba\u8a8d\u3067\u304d\u308b<\/p>\n<p>docker ps -a<br \/>\n\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306eDocker\u30b3\u30f3\u30c6\u30ca\u4e00\u89a7\u306e\u78ba\u8a8d<\/p>\n<p>docker run \u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u540d<br \/>\nDocker\u3000Hub\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3059\u308b<\/p>\n<p>\u30aa\u30d7\u30b7\u30e7\u30f3:<br \/>\n-d\u3000\u30b3\u30f3\u30c6\u30ca\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30f3\u30c9\u5b9f\u884c<br \/>\n-name \u30b3\u30f3\u30c6\u30ca\u540d\u3092\u6307\u5b9a<br \/>\n-p \u30db\u30b9\u30c8\u5074\u30dd\u30fc\u30c8:\u30b3\u30f3\u30c6\u30ca\u5074\u30dd\u30fc\u30c8 \u30db\u30b9\u30c8\u3068\u30b3\u30f3\u30c6\u30ca\u9593\u306e\u30dd\u30fc\u30c8\u8a2d\u5b9a <\/p>\n<p>docker pull \u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30c6\u30ca\u540d<br \/>\n\u516c\u958b\u3055\u308c\u3066\u3044\u308bDocker\u30a4\u30e1\u30fc\u30b8\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/p>\n<p>docker rm \u30b3\u30f3\u30c6\u30ca\u540d<br \/>\ndocker rm \u30b3\u30f3\u30c6\u30caid<br \/>\n\u8d77\u52d5\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u3092\u524a\u9664\u3059\u308b<\/p>\n<p>docker rmi \u30b3\u30f3\u30c6\u30ca\u540d<br \/>\ndocker rmi \u30b3\u30f3\u30c6\u30caid<br \/>\n\u8d77\u52d5\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306e\u30a4\u30e1\u30fc\u30b8\u3054\u3068\u524a\u9664\u3059\u308b<\/p>\n<p>docker stop\u3000\u30b3\u30f3\u30c6\u30ca\u540d<br \/>\n\u30b3\u30f3\u30c6\u30ca\u3092\u505c\u6b62\u3059\u308b<\/p>\n<h2>Docker Compose<\/h2>\n<p>Docker\u306e\u7ba1\u7406\u3092\u697d\u306b\u3059\u308b\u30c4\u30fc\u30eb\u3002<\/p>\n<p>\u5c0e\u5165\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u8a2d\u5b9a\u3092yml\u30d5\u30a1\u30a4\u30eb\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u30b3\u30f3\u30c6\u30ca\u306e\u8d77\u52d5\u3084\u505c\u6b62\u3092\u8907\u96d1\u306a\u30b3\u30de\u30f3\u30c9\u3067\u306a\u304f\u30b7\u30f3\u30d7\u30eb\u306b\u4f7f\u7528\u3067\u304d\u308b\u3002<\/p>\n<p>\u666e\u901a\u306b\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304c\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u9577\u304f\u306a\u3063\u3066\u8907\u96d1\u306b\u306a\u308b\u304c\u3001\u9577\u3044\u90e8\u5206\u3092yml\u30d5\u30a1\u30a4\u30eb\u306b\u79fb\u308b\u306e\u3067\u305d\u306e\u3076\u3093\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u304c\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308b\u3002<\/p>\n<p>\u516c\u958b\u3055\u308c\u3066\u3044\u308bDocker\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u3046\u3053\u3068\u3082\u3001\u81ea\u5206\u81ea\u8eab\u3067\u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker\u306b\u3064\u3044\u3066\u306e\u52c9\u5f37\u30e1\u30e2\u3067\u3059\u3002 Docker\u3068\u306f Docker\u3068\u306f\u3001\u30b3\u30f3\u30c6\u30ca\u578b\u306e\u4eee\u60f3\u5316\u74b0\u5883\u3092\u63d0\u4f9b\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3002 VMWare\u3001Virtual box\u3092\u306f\u3058\u3081\u3068\u3059\u308b\u30011\u53f0\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u4e2d\u306b\u8907\u6570\u306eO [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158,131],"tags":[],"class_list":["post-9682","post","type-post","status-publish","format-standard","hentry","category-docker","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9682"}],"version-history":[{"count":1,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9682\/revisions"}],"predecessor-version":[{"id":9834,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9682\/revisions\/9834"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}