{"id":124810,"date":"2018-10-22T09:10:13","date_gmt":"2018-10-22T01:10:13","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=124810"},"modified":"2018-10-22T09:10:13","modified_gmt":"2018-10-22T01:10:13","slug":"macos-install-docker","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/macos-install-docker.html","title":{"rendered":"MacOS Install Docker"},"content":{"rendered":"
\u4f7f\u7528 Homebrew \u5b89\u88c5<\/strong><\/span><\/div>\n

macOS \u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 Homebrew \u6765\u5b89\u88c5 Docker\u3002<\/p>\n

Homebrew \u7684 Cask \u5df2\u7ecf\u652f\u6301 Docker for Mac\uff0c\u56e0\u6b64\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u4f7f\u7528 Homebrew Cask \u6765\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n

\r\n$ brew cask install docker\r\n\r\n==> Creating Caskroom at \/usr\/local\/Caskroom\r\n==> We'll set permissions properly so we won't need sudo in the future\r\nPassword:          # \u8f93\u5165 macOS \u5bc6\u7801\r\n==> Satisfying dependencies\r\n==> Downloading https:\/\/download.docker.com\/mac\/stable\/21090\/Docker.dmg\r\n######################################################################## 100.0%\r\n==> Verifying checksum for Cask docker\r\n==> Installing Cask docker\r\n==> Moving App 'Docker.app' to '\/Applications\/Docker.app'.\r\n🍺  docker was successfully installed!\r\n\r\n<\/pre>\n

\u5728\u8f7d\u5165 Docker app \u540e\uff0c\u70b9\u51fb Next\uff0c\u53ef\u80fd\u4f1a\u8be2\u95ee\u4f60\u7684 macOS \u767b\u9646\u5bc6\u7801\uff0c\u4f60\u8f93\u5165\u5373\u53ef\u3002\u4e4b\u540e\u4f1a\u5f39\u51fa\u4e00\u4e2a Docker \u8fd0\u884c\u7684\u63d0\u793a\u7a97\u53e3\uff0c\u72b6\u6001\u680f\u4e0a\u4e5f\u6709\u6709\u4e2a\u5c0f\u9cb8\u9c7c\u7684\u56fe\u6807\u3002<\/p>\n

\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5<\/strong><\/span><\/div>\n

\u5982\u679c\u9700\u8981\u624b\u52a8\u4e0b\u8f7d\uff0c\u8bf7\u70b9\u51fb\u4ee5\u4e0b\u94fe\u63a5\u4e0b\u8f7d Stable \u6216 Edge \u7248\u672c\u7684 Docker for Mac\u3002<\/p>\n

\u5982\u540c macOS \u5176\u5b83\u8f6f\u4ef6\u4e00\u6837\uff0c\u5b89\u88c5\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u53cc\u51fb\u4e0b\u8f7d\u7684 .dmg \u6587\u4ef6\uff0c\u7136\u540e\u5c06\u9cb8\u9c7c\u56fe\u6807\u62d6\u62fd\u5230 Application \u6587\u4ef6\u5939\u5373\u53ef\u3002
\n\"\"<\/p>\n

\u4ece\u5e94\u7528\u4e2d\u627e\u5230 Docker \u56fe\u6807\u5e76\u70b9\u51fb\u8fd0\u884c\u3002\u53ef\u80fd\u4f1a\u8be2\u95ee macOS \u7684\u767b\u9646\u5bc6\u7801\uff0c\u8f93\u5165\u5373\u53ef\u3002
\n\"\"<\/p>\n

\u70b9\u51fb\u9876\u90e8\u72b6\u6001\u680f\u4e2d\u7684\u9cb8\u9c7c\u56fe\u6807\u4f1a\u5f39\u51fa\u64cd\u4f5c\u83dc\u5355\u3002
\n\"\"
\n\"\"<\/p>\n

\u7b2c\u4e00\u6b21\u70b9\u51fb\u56fe\u6807\uff0c\u53ef\u80fd\u4f1a\u770b\u5230\u8fd9\u4e2a\u5b89\u88c5\u6210\u529f\u7684\u754c\u9762\uff0c\u70b9\u51fb \"Got it!\" \u53ef\u4ee5\u5173\u95ed\u8fd9\u4e2a\u7a97\u53e3\u3002
\n\"\"<\/p>\n

\u542f\u52a8\u7ec8\u7aef\u540e\uff0c\u901a\u8fc7\u547d\u4ee4\u53ef\u4ee5\u68c0\u67e5\u5b89\u88c5\u540e\u7684 Docker \u7248\u672c\u3002<\/p>\n

\r\n$ docker --version\r\nDocker version 17.09.1-ce, build 19e2cf6\r\n<\/pre>\n
\u955c\u50cf\u52a0\u901f<\/strong><\/span><\/div>\n

\u9274\u4e8e\u56fd\u5185\u7f51\u7edc\u95ee\u9898\uff0c\u540e\u7eed\u62c9\u53d6 Docker \u955c\u50cf\u5341\u5206\u7f13\u6162\uff0c\u6211\u4eec\u53ef\u4ee5\u9700\u8981\u914d\u7f6e\u52a0\u901f\u5668\u6765\u89e3\u51b3\uff0c\u6211\u4f7f\u7528\u7684\u662f\u7f51\u6613\u7684\u955c\u50cf\u5730\u5740\uff1ahttp:\/\/hub-mirror.c.163.com\u3002<\/p>\n

\u5728\u4efb\u52a1\u680f\u70b9\u51fb Docker for mac \u5e94\u7528\u56fe\u6807 -> Perferences... -> Daemon -> Registry mirrors\u3002\u5728\u5217\u8868\u4e2d\u586b\u5199\u52a0\u901f\u5668\u5730\u5740\u5373\u53ef\u3002\u4fee\u6539\u5b8c\u6210\u4e4b\u540e\uff0c\u70b9\u51fb Apply & Restart \u6309\u94ae\uff0cDocker \u5c31\u4f1a\u91cd\u542f\u5e76\u5e94\u7528\u914d\u7f6e\u7684\u955c\u50cf\u5730\u5740\u4e86\u3002<\/p>\n

\u4e4b\u540e\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 docker info \u6765\u67e5\u770b\u662f\u5426\u914d\u7f6e\u6210\u529f\u3002<\/p>\n

\r\n$ docker info\r\n...\r\nRegistry Mirrors:\r\n http:\/\/hub-mirror.c.163.com\r\nLive Restore Enabled: false\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

macOS \u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 Homebrew \u6765\u5b89\u88c5 Docker\u3002 Homebrew \u7684 Cask \u5df2\u7ecf\u652f\u6301 […]<\/p>\n","protected":false},"author":1479,"featured_media":23890,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-124810","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/124810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1479"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=124810"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/124810\/revisions"}],"predecessor-version":[{"id":125050,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/124810\/revisions\/125050"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/23890"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=124810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=124810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=124810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}