{"id":1430,"date":"2021-07-05T11:32:58","date_gmt":"2021-07-05T03:32:58","guid":{"rendered":"https:\/\/www.zeroheart.xyz\/wordpress\/?p=1430"},"modified":"2021-11-14T13:08:45","modified_gmt":"2021-11-14T05:08:45","slug":"redhat-%e5%ae%89%e8%a3%85docker","status":"publish","type":"post","link":"https:\/\/www.zeroheart.xyz\/wordpress\/?p=1430","title":{"rendered":"redhat \u5b89\u88c5docker"},"content":{"rendered":"\n<p>sudo yum install -y yum-utils<\/p>\n\n\n\n<p>sudo yum-config-manager &#8211;add-repo http:\/\/mirrors.aliyun.com\/docker-ce\/linux\/centos\/docker-ce.repo<\/p>\n\n\n\n<p>sudo yum install docker-ce docker-ce-cli containerd.io<\/p>\n\n\n\n<p><em>#\u542f\u52a8<\/em> sudo systemctl start docker <\/p>\n\n\n\n<p><em>#\u505c\u6b62<\/em> sudo systemctl stop docker <\/p>\n\n\n\n<p><em>#\u91cd\u542f<\/em> sudo service docker restart <\/p>\n\n\n\n<p><em>#\u5f00\u673a\u542f\u52a8<\/em> sudo systemctl enable docker<\/p>\n\n\n\n<p>\u914d\u7f6e\u56fd\u5185\u955c\u50cf\u5730\u5740\uff0c\u5177\u4f53\u770b\u4e0b\u9762\u914d\u7f6e<br>\u56fd\u5185\u52a0\u901f\u670d\u52a1<br>\u7f51\u6613\uff1ahttps:\/\/hub-mirror.c.163.com\/<br>\u963f\u91cc\u4e91\uff1ahttps:\/\/&lt;\u4f60\u7684ID&gt;.mirror.aliyuncs.com<br>\u4e03\u725b\u4e91\u52a0\u901f\u5668\uff1ahttps:\/\/reg-mirror.qiniu.com<br>\u963f\u91cc\u4e91\u955c\u50cf\u52a0\u901f\u5730\u5740\u83b7\u53d6\uff1a https:\/\/cr.console.aliyun.com\/cn-hangzhou\/instances\/mirrors<\/p>\n\n\n\n<p>vi \/etc\/docker\/daemon.json<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"registry-mirrors\": &#91;\"http:\/\/hub-mirror.c.163.com\"]\n}<\/code><\/pre>\n\n\n\n<p>service docker restart<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5378\u8f7d<\/p>\n\n\n\n<p>sudo yum remove docker-ce docker-ce-cli containerd.io<\/p>\n\n\n\n<p>sudo rm -rf \/var\/lib\/docker <\/p>\n\n\n\n<p>sudo rm -rf \/var\/lib\/containerd<\/p>\n\n\n\n<p>=======================================<\/p>\n\n\n\n<p>11.14\uff0c\u76f4\u63a5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u4e5f\u53ef\u4ee5<\/p>\n\n\n\n<p>yum -y install docker<\/p>\n\n\n\n<p>systemctl start docker<\/p>\n\n\n\n<p>\u81ea\u542f\u52a8<\/p>\n\n\n\n<p>systemctl enable docker.service<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>sudo yum install -y yum-utils sudo yum-config-manager &#038; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[106],"_links":{"self":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1430"}],"collection":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1430"}],"version-history":[{"count":6,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1430\/revisions"}],"predecessor-version":[{"id":1480,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1430\/revisions\/1480"}],"wp:attachment":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}