{"id":118,"date":"2025-04-15T12:56:53","date_gmt":"2025-04-15T12:56:53","guid":{"rendered":"http:\/\/www.zhangwk.cn\/?p=118"},"modified":"2025-04-17T07:44:20","modified_gmt":"2025-04-17T07:44:20","slug":"docker-ce-%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.zhangwk.cn\/index.php\/2025\/04\/15\/docker-ce-%e5%ae%89%e8%a3%85\/","title":{"rendered":"docker-ce \u5b89\u88c5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">1\u3001docker\u5b89\u88c5<\/p>\n\n\n\n<pre class=\"wp-block-code has-luminous-vivid-orange-color has-pale-ocean-gradient-background has-text-color has-background has-link-color wp-elements-f0dcc9f740888b2aa8b3986b2782a95b\"><code># step 1: \u5b89\u88c5\u5fc5\u8981\u7684\u4e00\u4e9b\u7cfb\u7edf\u5de5\u5177\nsudo yum install -y yum-utils\n\n# Step 2: \u6dfb\u52a0\u8f6f\u4ef6\u6e90\u4fe1\u606f\nyum-config-manager --add-repo https:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo\n\n# Step 3: \u5b89\u88c5Docker\nsudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\n# Step 4: \u5f00\u542fDocker\u670d\u52a1\nsudo service docker start\n\n# \u6ce8\u610f\uff1a\n# \u5b98\u65b9\u8f6f\u4ef6\u6e90\u9ed8\u8ba4\u542f\u7528\u4e86\u6700\u65b0\u7684\u8f6f\u4ef6\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u7f16\u8f91\u8f6f\u4ef6\u6e90\u7684\u65b9\u5f0f\u83b7\u53d6\u5404\u4e2a\u7248\u672c\u7684\u8f6f\u4ef6\u5305\u3002\u4f8b\u5982\u5b98\u65b9\u5e76\u6ca1\u6709\u5c06\u6d4b\u8bd5\u7248\u672c\u7684\u8f6f\u4ef6\u6e90\u7f6e\u4e3a\u53ef\u7528\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5f00\u542f\u3002\u540c\u7406\u53ef\u4ee5\u5f00\u542f\u5404\u79cd\u6d4b\u8bd5\u7248\u672c\u7b49\u3002\n# vim \/etc\/yum.repos.d\/docker-ce.repo\n#   \u5c06&#91;docker-ce-test]\u4e0b\u65b9\u7684enabled=0\u4fee\u6539\u4e3aenabled=1\n#\n# \u5b89\u88c5\u6307\u5b9a\u7248\u672c\u7684Docker-CE:\n# Step 1: \u67e5\u627eDocker-CE\u7684\u7248\u672c:\n# yum list docker-ce.x86_64 --showduplicates | sort -r\n#   Loading mirror speeds from cached hostfile\n#   Loaded plugins: branch, fastestmirror, langpacks\n#   docker-ce.x86_64            17.03.1.ce-1.el7.centos            docker-ce-stable\n#   docker-ce.x86_64            17.03.1.ce-1.el7.centos            @docker-ce-stable\n#   docker-ce.x86_64            17.03.0.ce-1.el7.centos            docker-ce-stable\n#   Available Packages\n# Step2: \u5b89\u88c5\u6307\u5b9a\u7248\u672c\u7684Docker-CE: (VERSION\u4f8b\u5982\u4e0a\u9762\u768417.03.0.ce.1-1.el7.centos)\n# sudo yum -y install docker-ce-&#91;VERSION]\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001docker\u5b89\u88c5<\/p>\n","protected":false},"author":1,"featured_media":189,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[15],"class_list":["post-118","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","tag-docker"],"_links":{"self":[{"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":3,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/posts\/118\/revisions\/140"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/media\/189"}],"wp:attachment":[{"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangwk.cn\/index.php\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}