{"id":181909,"date":"2020-05-22T08:00:57","date_gmt":"2020-05-22T00:00:57","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=181909"},"modified":"2020-05-12T08:55:48","modified_gmt":"2020-05-12T00:55:48","slug":"centos81-install-docker","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/centos81-install-docker.html","title":{"rendered":"\u5728CentOS 8.1\u4e0a\u5b89\u88c5 Docker"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e0b\u8f7d\u4e86CentOS 8.1\uff0c\u5e76\u5c1d\u8bd5\u5b89\u88c5docker\uff0c\u8bb0\u5f55\u4e0b\u6b65\u9aa4\u4e0e\u5927\u5bb6\u5206\u4eab\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u5b98\u65b9Docker\u5b58\u50a8\u5e93\u5728CentOS 8.1\u4e0a\u5b89\u88c5\u548c\u8fd0\u884cDocker CE\u3002<\/p>\n

\"\"<\/p>\n

\u4ec0\u4e48\u662fDocker\uff1f<\/strong><\/div>\n

Docker\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u5b83\u5141\u8bb8\u5728\u5bb9\u5668\u5185\u90e8\u521b\u5efa\u548c\u5206\u53d1\u5e94\u7528\u7a0b\u5e8f\uff0c\u5bb9\u5668\u662f\u53ef\u4ee5\u72ec\u7acb\u4e8e\u4e3b\u673a\u7cfb\u7edf\u8f7b\u677e\u590d\u5236\u7684\u6807\u51c6\u5316\u73af\u5883\u3002<\/p>\n

\u6dfb\u52a0Docker\u5b58\u50a8\u5e93<\/strong><\/div>\n

\u9996\u5148\uff0c\u6211\u4eec\u5fc5\u987b\u6dfb\u52a0\u4e00\u4e2a\u5916\u90e8\u5b58\u50a8\u5e93\u4ee5\u83b7\u5f97Docker CE\u3002\u6211\u4eec\u5c06\u4f7f\u7528\u5b98\u65b9\u7684Docker CE CentOS\u5b58\u50a8\u5e93\u3002<\/p>\n

\u5b89\u88c5\u6b65\u9aa4\uff1a<\/p>\n

\u4e0b\u8f7ddocker-ce\u7684repo
\n<\/strong><\/span><\/div>\n
$curl https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo -o \/etc\/yum.repos.d\/docker-ce.repo\r\n  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current\r\n                                Dload  Upload  Total  Spent    Left  Speed\r\n100  2424  100  2424    0    0  2669      0 --:--:-- --:--:-- --:--:--  2666<\/pre>\n
\u5b89\u88c5\u4f9d\u8d56\uff08\u8fd9\u662f\u76f8\u6bd4CentOS 7\u7684\u5173\u952e\u6b65\u9aa4\uff09<\/strong><\/span><\/div>\n
$yum install https:\/\/download.docker.com\/linux\/Fedora\/30\/x86_64\/stable\/Packages\/containerd.io-1.2.6-3.3.fc30.x86_64.rpm\r\nDocker CE Stable - x86_64                      9.3 kB\/s |  22 kB    00:02   \r\n\u4e0a\u6b21\u5143\u6570\u636e\u8fc7\u671f\u68c0\u67e5\uff1a0:00:01 \u524d\uff0c\u6267\u884c\u4e8e 2020\u5e7404\u670819\u65e5 \u661f\u671f\u65e5 05\u65f623\u520613\u79d2\u3002\r\ncontainerd.io-1.2.6-3.3.fc30.x86_64.rpm        544 kB\/s |  21 MB    00:40   \r\n\u4f9d\u8d56\u5173\u7cfb\u89e3\u51b3\u3002\r\n================================================================================\r\n \u8f6f\u4ef6\u5305              \u67b6\u6784        \u7248\u672c                \u4ed3\u5e93                \u5927\u5c0f\r\n================================================================================\r\n\u5b89\u88c5:\r\n containerd.io      x86_64      1.2.6-3.3.fc30      @commandline        21 M\r\n    \u66ff\u6362  runc.x86_64 1.0.0-64.rc9.module_el8.1.0+272+3e64ee36\r\n\r\n\u4e8b\u52a1\u6982\u8981\r\n================================================================================\r\n\u5b89\u88c5  1 \u8f6f\u4ef6\u5305\r\n\r\n\u603b\u8ba1\uff1a21 M\r\n\u786e\u5b9a\u5417\uff1f[y\/N]\uff1a y<\/pre>\n
\u5b89\u88c5docker-ce<\/strong><\/span><\/div>\n
$yum install docker-ce\r\n\u4e0a\u6b21\u5143\u6570\u636e\u8fc7\u671f\u68c0\u67e5\uff1a0:01:42 \u524d\uff0c\u6267\u884c\u4e8e 2020\u5e7404\u670819\u65e5 \u661f\u671f\u65e5 05\u65f623\u520613\u79d2\u3002\r\n\u4f9d\u8d56\u5173\u7cfb\u89e3\u51b3\u3002\r\n================================================================================\r\n \u8f6f\u4ef6\u5305            \u67b6\u6784      \u7248\u672c                  \u4ed3\u5e93                  \u5927\u5c0f\r\n================================================================================\r\n\u5b89\u88c5:\r\n docker-ce        x86_64    3:19.03.8-3.el7        docker-ce-stable      25 M\r\n\u5b89\u88c5\u4f9d\u8d56\u5173\u7cfb:\r\n libcgroup        x86_64    0.41-19.el8            base                  70 k\r\n docker-ce-cli    x86_64    1:19.03.8-3.el7        docker-ce-stable      40 M\r\n\r\n\u4e8b\u52a1\u6982\u8981\r\n================================================================================\r\n\u5b89\u88c5  3 \u8f6f\u4ef6\u5305\r\n\r\n\u603b\u4e0b\u8f7d\uff1a64 M\r\n\u5b89\u88c5\u5927\u5c0f\uff1a273 M\r\n\u786e\u5b9a\u5417\uff1f[y\/N]\uff1a y<\/pre>\n
\u542f\u52a8docker<\/strong><\/span><\/div>\n
$systemctl start docker<\/pre>\n

\u6211\u4eec\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u8be5\u670d\u52a1\u662f\u5426\u6b63\u5728\u6b63\u5e38\u8fd0\u884c\uff1a<\/p>\n

$systemctl status  docker\r\n\r\n\u25cf docker.service - Docker Application Container Engine\r\n  Loaded: loaded (\/usr\/lib\/systemd\/system\/docker.service; disabled; vendor pre>\r\n  Active: active (running) since Sun 2020-04-19 05:28:15 EDT; 8min ago\r\n    Docs: https:\/\/docs.docker.com\r\n Main PID: 60217 (dockerd)\r\n    Tasks: 15\r\n  Memory: 195.9M\r\n  CGroup: \/system.slice\/docker.service\r\n          \u251c\u250060217 \/usr\/bin\/dockerd -H fd:\/\/ --containerd=\/run\/containerd\/conta>\r\n          \u2514\u250060528 \/usr\/bin\/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port><\/pre>\n

\u5230\u6b64\uff0cDocker\u4ec5\u662f\u5b89\u88c5\u6210\u529f\uff0c\u5176\u4ed6\u529f\u80fd\u6709\u5f85\u6d4b\u8bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u5b98\u65b9Docker\u5b58\u50a8\u5e93\u5728CentOS 8.1\u4e0a\u5b89\u88c5\u548c\u8fd0\u884cDocker CE\u3002 D […]<\/p>\n","protected":false},"author":317,"featured_media":170013,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-181909","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\/181909","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\/317"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=181909"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/181909\/revisions"}],"predecessor-version":[{"id":181921,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/181909\/revisions\/181921"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/170013"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=181909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=181909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=181909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}