{"id":113,"date":"2020-01-13T14:28:08","date_gmt":"2020-01-13T06:28:08","guid":{"rendered":"http:\/\/blog.yuekegu.com\/?p=113"},"modified":"2020-01-13T14:28:08","modified_gmt":"2020-01-13T06:28:08","slug":"docker-toolbox-%e5%8a%a0%e9%80%9f","status":"publish","type":"post","link":"https:\/\/book.yuekegu.com\/index.php\/2020\/01\/13\/docker-toolbox-%e5%8a%a0%e9%80%9f\/","title":{"rendered":"Docker Toolbox \u52a0\u901f"},"content":{"rendered":"\n<p> \u5728 Windows\u3001Mac \u7cfb\u7edf\u4e0a\u4f7f\u7528 Docker Toolbox \u7684\u8bdd\uff0c\u63a8\u8350\u505a\u6cd5\u662f\u5728\u521b\u5efa Linux \u865a\u62df\u673a\u7684\u65f6\u5019\uff0c\u5c31\u5c06\u52a0\u901f\u5668\u7684\u5730\u5740\u914d\u7f6e\u8fdb\u53bb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker-machine create --engine-registry-mirror=&lt;your accelerate address> -d virtualbox default\ndocker-machine env default\neval \"$(docker-machine env default)\"\ndocker info     \n<\/code><\/pre>\n\n\n\n<p> \u56fd\u5185\u8f83\u5feb\u7684\u955c\u50cf\u539f\u5730\u5740 :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#Docker \u5b98\u65b9\u4e2d\u56fd\u533a\nhttps:\/\/registry.docker-cn.com\n#\u7f51\u6613\nhttp:\/\/hub-mirror.c.163.com\n#ustc\nhttps:\/\/docker.mirrors.ustc.edu.cn<\/code><\/pre>\n\n\n\n<p>\u65b9\u6cd5\u4e00\uff1a<\/p>\n\n\n\n<p>\u5728\u62c9\u53d6\u955c\u50cf\u65f6\u5019\u6307\u5b9a\u955c\u50cf\u6e90\u5730\u5740<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u76f4\u63a5\u4ece\u8be5\u955c\u50cf\u52a0\u901f\u5730\u5740\u8fdb\u884c\u62c9\u53d6\n$ docker pull registry.docker-cn.com\/myname\/myrepo:mytag\n\u4f8b\u5982:\n$ docker pull registry.docker-cn.com\/library\/ubuntu:16.04<\/code><\/pre>\n\n\n\n<p>\u65b9\u6cd5\u4e8c\uff1a<\/p>\n\n\n\n<p>\n\n\u4f7f\u7528 \u2013registry-mirror \u914d\u7f6e Docker \u5b88\u62a4\u8fdb\u7a0b&nbsp;<br>\u60a8\u53ef\u4ee5\u914d\u7f6e Docker \u5b88\u62a4\u8fdb\u7a0b\u9ed8\u8ba4\u4f7f\u7528 Docker \u5b98\u65b9\u955c\u50cf\u52a0\u901f\u3002\u8fd9\u6837\u60a8\u53ef\u4ee5\u9ed8\u8ba4\u901a\u8fc7\u5b98\u65b9\u955c\u50cf\u52a0\u901f\u62c9\u53d6\u955c\u50cf\uff0c\u800c\u65e0\u9700\u5728\u6bcf\u6b21\u62c9\u53d6\u65f6\u6307\u5b9a registry.docker-cn.com\u3002\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u60a8\u53ef\u4ee5\u5728 Docker \u5b88\u62a4\u8fdb\u7a0b\u542f\u52a8\u65f6\u4f20\u5165 --registry-mirror \u53c2\u6570\uff1a\n$ docker --registry-mirror=https:\/\/registry.docker-cn.com daemon<\/code><\/pre>\n\n\n\n<p><em>\u6709\u6548\u65f6\u95f4\u4e3a\u5f53\u524d\u7684docker\u8fdb\u7a0b\uff0c\u91cd\u542fdocker\u670d\u52a1\u540e\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e<\/em><\/p>\n\n\n\n<p>\u65b9\u6cd5\u4e09\uff1a<\/p>\n\n\n\n<p>\n\n\u4e3a\u4e86\u6c38\u4e45\u6027\u4fdd\u7559\u66f4\u6539\uff0c\u60a8\u53ef\u4ee5\u4fee\u6539 \/etc\/docker\/daemon.json \u6587\u4ef6\u5e76\u6dfb\u52a0\u4e0a registry-mirrors \u952e\u503c\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"registry-mirrors\": [\"http:\/\/hub-mirror.c.163.com\"]\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Windows\u3001Mac \u7cfb\u7edf\u4e0a\u4f7f\u7528 Docker Toolbox \u7684\u8bdd\uff0c\u63a8\u8350\u505a\u6cd5\u662f\u5728\u521b\u5efa Linux \u865a\u62df\u673a\u7684\u65f6\u5019\uff0c\u5c31\u5c06\u52a0\u901f\u5668\u7684\u5730\u5740\u914d\u7f6e\u8fdb\u53bb\u3002 \u56fd\u5185\u8f83\u5feb\u7684\u955c\u50cf\u539f\u5730\u5740 : \u65b9\u6cd5\u4e00\uff1a \u5728\u62c9\u53d6\u955c\u50cf\u65f6\u5019\u6307\u5b9a\u955c\u50cf\u6e90\u5730\u5740 \u65b9\u6cd5\u4e8c\uff1a \u4f7f\u7528 \u2013registry-mirror \u914d\u7f6e Docker \u5b88\u62a4\u8fdb\u7a0b&nbsp;\u60a8\u53ef\u4ee5\u914d\u7f6e Docker \u5b88\u62a4\u8fdb\u7a0b\u9ed8\u8ba4\u4f7f\u7528 Docker \u5b98\u65b9\u955c\u50cf\u52a0\u901f\u3002\u8fd9\u6837\u60a8\u53ef\u4ee5\u9ed8\u8ba4\u901a\u8fc7\u5b98\u65b9\u955c\u50cf\u52a0\u901f\u62c9\u53d6\u955c\u50cf\uff0c\u800c\u65e0\u9700\u5728\u6bcf\u6b21\u62c9\u53d6\u65f6\u6307\u5b9a registry.docker-cn.com\u3002 \u6709\u6548\u65f6\u95f4\u4e3a\u5f53\u524d\u7684docker\u8fdb\u7a0b\uff0c\u91cd\u542fdocker\u670d\u52a1\u540e\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e \u65b9\u6cd5\u4e09\uff1a \u4e3a\u4e86\u6c38\u4e45\u6027\u4fdd\u7559\u66f4\u6539\uff0c\u60a8\u53ef\u4ee5\u4fee\u6539 \/etc\/docker\/daemon.json \u6587\u4ef6\u5e76\u6dfb\u52a0\u4e0a registry-mirrors \u952e\u503c<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":0,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}