{"id":15515,"date":"2024-11-18T20:00:28","date_gmt":"2024-11-18T12:00:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/?p=15515"},"modified":"2024-11-18T20:00:28","modified_gmt":"2024-11-18T12:00:28","slug":"docker%e7%9a%84%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/15515\/","title":{"rendered":"Docker\u7684\u5b89\u88c5"},"content":{"rendered":"<p>Docker\u7684\u5b89\u88c5\u53ef\u53c2\u8003\uff1ahttps:\/\/docs.docker.com\/engine\/installation\/linux\/centos\/\uff0cDocker\u7684\u5b89\u88c5\u65b9\u5f0f\u6709\u4e09\u79cd\uff1aYum\u5b89\u88c5\u3001\u4f7f\u7528rpm\u5305\u3001\u5df2\u7f16\u8bd1\u7684\u4e8c\u8fdb\u5236\u5305\u3001\u6e90\u7801\u7f16\u8bd1\u3002<\/p>\n<h3>\u4e00\u3001Yum\u5b89\u88c5<\/h3>\n<p>\u8fd9\u662f\u6700\u7b80\u5355\u7684\u4e00\u79cd\u5b89\u88c5\u65b9\u5f0f\uff0c\u76ee\u5f55\u5206\u5e03\u91c7\u7528\u9ed8\u8ba4\u7684\u8bbe\u7f6e\u3002\u8fd9\u4e2a\u4e5f\u662f\u672c\u4eba\u5f88\u4e0d\u559c\u6b22\u7684\u3002\u6240\u4ee5\u8fd9\u79cd\u5b89\u88c5\u65b9\u5f0f\u521d\u6b21\u4f7f\u7528 docker\u7684\u670b\u53cb\uff0c\u53ef\u4ee5\u9009\u62e9\u8fd9\u79cd\u65b9\u5f0f\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>1\u3001\u7248\u672c\u9009\u62e9<\/h4>\n<p>docker\u5305\u62ec CE(community edition)\u793e\u533a\u7248\u548cEE(enterprise edition)\u4f01\u4e1a\u7248\uff0cCE \u7248\u53c8\u5206\u4e3a stable \u548c edge ,\u8fd9\u4e24\u4e2a\u7248\u672c\u7684\u533a\u522b\u5728\u4e8e\u66f4\u65b0\u7684\u9891\u7387\u3002<\/p>\n<h4>2\u3001\u4e0b\u8f7drepo<\/h4>\n<p>\u4e0b\u8f7d\u5b98\u65b9\u7684 repo \u5e93\u6587\u4ef6<\/p>\n<pre># curl -O https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/pre>\n<h4>3\u3001\u5b89\u88c5<\/h4>\n<p>docker-ce.x86_64\uff1a64\u4f4d\u64cd\u4f5c\u7cfb\u7edf<br \/>\ndocker-ce-selinux.noarch\uff1a\u5bf9CPU\u4e0d\u505a\u8981\u6c42\u7684\u7248\u672c<\/p>\n<pre># yum install docker.x86_64<\/pre>\n<h3>\u4e8c\u3001\u4f7f\u7528 RPM\u5305<\/h3>\n<p>\u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/download.docker.com\/linux\/centos\/7\/x86_64\/stable\/Packages\/<\/p>\n<p>\u548c\u4f7f\u7528 YUM \u5dee\u4e0d\u591a<\/p>\n<h3>\u4e09\u3001\u5df2\u7f16\u8bd1\u7684\u4e8c\u8fdb\u5236\u5305<strong>\u00a0\u2014 \u63a8\u8350<\/strong><\/h3>\n<p>\u8fd9\u4e2a\u662f\u6781\u529b\u63a8\u8350\u7684\u4e00\u79cd\u5b89\u88c5\u65b9\u6cd5\uff0c\u4e5f\u662f\u6700\u7b80\u5355\u3001\u76f4\u89c2\u7684\u5b89\u88c5\u3002<\/p>\n<p>\u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/docs.docker.com\/engine\/installation\/linux\/docker-ce\/binaries\/#install-static-binaries<\/p>\n<p>\u5b98\u65b9\u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/github.com\/moby\/moby\/releases<\/p>\n<p>\u4e0b\u8f7d\u540e\u89e3\u538b\uff0c\u5373\u53ef\u4f7f\u7528<\/p>\n<pre>curl -O https:\/\/test.docker.com\/builds\/Linux\/x86_64\/docker-17.05.0-ce-rc2.tgz\r\ntar xzf docker-17.05.0-ce-rc2.tgz \r\nmv docker \/usr\/local\/<\/pre>\n<p>\u521b\u5efa\u6587\u4ef6 daemon.json<\/p>\n<pre>\u542f\u52a8\uff1a\/usr\/local\/docker\/dockerd --config-file \/usr\/local\/docker\/daemon.json<\/pre>\n<p>\u5236\u4f5c\u4e86\u4e00\u4e2adocker \u7684\u542f\u52a8\u811a\u672c\uff0c\u53ef\u4ee5\u901a\u8fc7dk start \u3001dk stop\u3001dk restart \u5feb\u901f\u542f\u52a8dockerd<\/p>\n<h3>\u56db\u3001\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5<\/h3>\n<p>\u6b64\u5904\u4ee5\u540e\u6709\u65f6\u95f4\u518d\u4ecb\u7ecd\uff0c\u8fd9\u4e2a\u4e3b\u8981\u9002\u7528\u4e8e\u5bf9docker\u8fdb\u884c\u7684\u4e8c\u6b21\u5f00\u53d1\u6bd4\u8f83\u5b9e\u7528\u3002<\/p>\n<h3>\u4e94\u3001\u521b\u5efa\u52a0\u901f<\/h3>\n<p>\u53c2\u8003\uff1aDocker\u7684\u914d\u7f6e\u6587\u4ef6 daemon.json \u8be6\u7ec6\u89e3<\/p>\n<p>\u53c2\u8003\uff1aDocker\u7684\u542f\u52a8\u53c2\u6570<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker\u7684\u5b89\u88c5\u53ef\u53c2\u8003\uff1ahttps:\/\/docs.docker.com\/engine\/installation\/linux\/centos\/\uff0cDocker\u7684\u5b89\u88c5\u65b9\u5f0f\u6709\u4e09\u79cd\uff1aYum\u5b89\u88c5\u3001\u4f7f\u7528rpm\u5305\u3001\u5df2\u7f16\u8bd1\u7684\u4e8c\u8fdb\u5236\u5305\u3001\u6e90\u7801\u7f16\u8bd1\u3002 \u4e00\u3001Yum\u5b89\u88c5 \u8fd9\u662f\u6700\u7b80\u5355\u7684\u4e00\u79cd\u5b89\u88c5\u65b9\u5f0f\uff0c\u76ee\u5f55\u5206\u5e03\u91c7\u7528\u9ed8\u8ba4\u7684\u8bbe\u7f6e\u3002\u8fd9\u4e2a\u4e5f\u662f\u672c\u4eba\u5f88\u4e0d\u559c\u6b22\u7684\u3002\u6240\u4ee5\u8fd9\u79cd\u5b89\u88c5\u65b9\u5f0f\u521d\u6b21\u4f7f\u7528 docker\u7684\u670b\u53cb\uff0c\u53ef\u4ee5\u9009\u62e9\u8fd9\u79cd\u65b9\u5f0f\u3002 &nbsp; 1\u3001\u7248\u672c\u9009\u62e9 docker\u5305\u62ec CE(community edition)\u793e\u533a\u7248\u548cEE(enterprise edition)\u4f01\u4e1a\u7248\uff0cCE \u7248\u53c8\u5206\u4e3a stable \u548c edge ,\u8fd9\u4e24\u4e2a\u7248\u672c\u7684\u533a\u522b\u5728\u4e8e\u66f4\u65b0\u7684\u9891\u7387\u3002 2\u3001\u4e0b\u8f7drepo \u4e0b\u8f7d\u5b98\u65b9\u7684 repo \u5e93\u6587\u4ef6 # curl -O https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo 3\u3001\u5b89\u88c5 docker-ce.x86_64\uff1a64\u4f4d\u64cd\u4f5c\u7cfb\u7edf docker-ce-selinux.noarch\uff1a\u5bf9CPU\u4e0d\u505a\u8981\u6c42\u7684\u7248\u672c # yum install docker.x86_64 \u4e8c\u3001\u4f7f\u7528 RPM\u5305 \u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/download.docker.com\/linux\/centos\/7\/x86_64\/stable\/Packages\/ \u548c\u4f7f\u7528 YUM \u5dee\u4e0d\u591a \u4e09\u3001\u5df2\u7f16\u8bd1\u7684\u4e8c\u8fdb\u5236\u5305\u00a0\u2014 \u63a8\u8350 \u8fd9\u4e2a\u662f\u6781\u529b\u63a8\u8350\u7684\u4e00\u79cd\u5b89\u88c5\u65b9\u6cd5\uff0c\u4e5f\u662f\u6700\u7b80\u5355\u3001\u76f4\u89c2\u7684\u5b89\u88c5\u3002 \u5b98\u65b9\u6587\u6863\uff1ahttps:\/\/docs.docker.com\/engine\/installation\/linux\/docker-ce\/binaries\/#install-static-binaries \u5b98\u65b9\u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/github.com\/moby\/moby\/releases \u4e0b\u8f7d\u540e\u89e3\u538b\uff0c\u5373\u53ef\u4f7f\u7528 curl -O https:\/\/test.docker.com\/builds\/Linux\/x86_64\/docker-17.05.0-ce-rc2.tgz tar xzf docker-17.05.0-ce-rc2.tgz mv docker \/usr\/local\/ \u521b\u5efa\u6587\u4ef6 daemon.json \u542f\u52a8\uff1a\/usr\/local\/docker\/dockerd &#8211;config-file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-15515","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=15515"}],"version-history":[{"count":1,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15515\/revisions"}],"predecessor-version":[{"id":15516,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/15515\/revisions\/15516"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=15515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=15515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=15515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}