{"id":1727,"date":"2020-06-28T14:22:39","date_gmt":"2020-06-28T06:22:39","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=1727"},"modified":"2020-06-28T14:23:17","modified_gmt":"2020-06-28T06:23:17","slug":"machine","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2020\/06\/28\/machine\/","title":{"rendered":"docker\u4e09\u5251\u5ba2\u4e4bmachine"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Docker Machine \u662f Docker \u5b98\u65b9\u7f16\u6392\uff08Orchestration\uff09\u9879\u76ee\u4e4b\u4e00\uff0c\u8d1f\u8d23\u5728\u591a\u79cd\u5e73\u53f0\u4e0a\u5feb\u901f\u5b89 \u88c5 Docker \u73af\u5883\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1\u3001\u5b89\u88c5\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Docker Machine \u53ef\u4ee5\u5728\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\u5e73\u53f0\u4e0a\u5b89\u88c5\uff0c\u5305\u62ec Linux\u3001macOS\uff0c\u4ee5\u53ca Windows\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Docker for Mac\u3001Docker for Windows \u81ea\u5e26 docker-machine \u4e8c\u8fdb\u5236\u5305\uff0c\u5b89\u88c5\u4e4b\u540e\u5373\u53ef\u4f7f\u7528\u3002 \u67e5\u770b\u7248\u672c\u4fe1\u606f\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\uff1a docker-machine -v <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 Linux \u4e0a\u7684\u4e5f\u5b89\u88c5\u5341\u5206\u7b80\u5355\uff0c\u4ece \u5b98\u65b9 GitHub Release \u5904\u76f4\u63a5\u4e0b\u8f7d\u7f16\u8bd1\u597d\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u5373\u53ef\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo curl -L https:\/\/github.com\/docker\/machine\/releases\/download\/v0.13.0\/docker-mach ine-`uname -s`-`uname -m` > \/usr\/local\/bin\/docker-machine <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">chmod +x  docker-machine                \/\/\u7ed9\u6587\u4ef6\u8d4b\u4e88\u6267\u884c\u6743\u9650<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u547d\u4ee4docker-machine -v\u6d4b\u8bd5\u662f\u5426\u5b89\u88c5\u6210\u529f\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"183\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/06\/8-4.png\" alt=\"\" class=\"wp-image-1729\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/06\/8-4.png 531w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/06\/8-4-300x103.png 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2\u3001\u4f7f\u7528\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">docker-machine\u652f\u6301\u591a\u79cd\u540e\u7aef\u9a71\u52a8\uff0c\u5305\u62ec\u865a\u62df\u673a\u3001\u672c\u5730\u4e3b\u673a\u3001\u4e91\u5e73\u53f0\u7b49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7virtualbox\u9a71\u52a8\u521b\u5efa\u4e00\u53f0docker\u4e3b\u673a\uff0c\u540d\u5b57\u4e3atest, \u6267\u884c\u547d\u4ee4<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> docker-machine create -d virtualbox test <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> \u4e5f\u53ef\u4ee5\u5728\u521b\u5efa\u65f6\u52a0\u4e0a\u5982\u4e0b\u53c2\u6570\uff0c\u6765\u914d\u7f6e\u4e3b\u673a\u6216\u8005\u4e3b\u673a\u4e0a\u7684 Docker\u3002 <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> &#8211;engine-opt dns=114.114.114.114 \u914d\u7f6e Docker \u7684\u9ed8\u8ba4 DNS <\/li><li> &#8211;engine-registry-mirror https:\/\/registry.docker-cn.com \u914d\u7f6e Docker \u7684\u4ed3\u5e93\u955c\u50cf <\/li><li> &#8211;virtualbox-memory 2048 \u914d\u7f6e\u4e3b\u673a\u5185\u5b58 <\/li><li> &#8211;virtualbox-cpu-count 2 \u914d\u7f6e\u4e3b\u673a CPU <\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u591a\u7528\u6cd5\u53ef\u4ee5\u901a\u8fc7docker-machine &#8211;help\u67e5\u770b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker Machine \u662f Docker \u5b98\u65b9\u7f16\u6392\uff08Orchestration\uff09\u9879\u76ee\u4e4b\u4e00\uff0c\u8d1f\u8d23\u5728\u591a\u79cd\u5e73\u53f0 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1731,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,23],"tags":[90],"class_list":["post-1727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-rong","tag-machine"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1727"}],"version-history":[{"count":2,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1727\/revisions"}],"predecessor-version":[{"id":1730,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1727\/revisions\/1730"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/1731"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}