{"id":1497,"date":"2020-05-23T13:24:04","date_gmt":"2020-05-23T05:24:04","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=1497"},"modified":"2023-03-20T10:22:48","modified_gmt":"2023-03-20T02:22:48","slug":"docker-2","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2020\/05\/23\/docker-2\/","title":{"rendered":"Docker\u5b88\u62a4\u8fdb\u7a0b\u5b95\u673a\u7684\u5904\u7406\u673a\u5236"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6309\u7167Docker\u7684\u8bbe\u8ba1\uff0c\u5f53\u901a\u8fc7systemctl stop docker \u547d\u4ee4\u505c\u6b62docker\u6216\u8005docker\u7684\u5b88\u62a4\u8fdb\u7a0b\u5f02\u5e38\u9000\u51fa\u7684\u65f6\u5019\uff0c\u5185\u90e8\u7684\u5bb9\u5668\u4e5f\u968f\u4e4b\u5173\u95ed\uff0c\u6b64\u65f6\u591a\u4e2a\u5bb9\u5668\u540c\u65f6\u5931\u6548\uff0c\u4e0d\u518d\u5177\u5907\u9ad8\u53ef\u7528\uff0c\u539f\u56e0\u662f\u6240\u6709\u7684docker\u5bb9\u5668\u7684\u8fdb\u7a0b\u90fd\u662f\u5b88\u62a4\u8fdb\u7a0b\u7684\u5b50\u8fdb\u7a0b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ecedocker1.12\u7248\u672c\u5f00\u59cb\uff0c\u589e\u52a0\u4e86live-restore\u9009\u9879\uff0c\u53bb\u6389\u4e86docker\u5b88\u62a4\u8fdb\u7a0b\u7684\u4f9d\u8d56\uff0c\u5373\u4f7fdocker\u5b88\u62a4\u8fdb\u7a0b\u5173\u95ed\uff0c\u5185\u90e8\u7684\u5bb9\u5668\u7167\u6837\u53ef\u4ee5\u8fd0\u884c\uff0c\u5f53\u5b88\u62a4\u8fdb\u7a0b\u6062\u590d\u540e\uff0c\u5bb9\u5668\u53c8\u91cd\u65b0\u88ab\u5b88\u62a4\u8fdb\u7a0b\u7ba1\u7406\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u914d\u7f6e\u65b9\u6cd5\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6vim \/etc\/docker\/daemon.json\uff0c\u5728\u5176\u4e2d\u52a0\u5165&#8221;live-restore&#8221;: true\u547d\u4ee4\uff0c\u5728\/usr\/lib\/systemd\/system\/docker.service\u4e2d\u6dfb\u52a0KillMode=process\u547d\u4ee4\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"252\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/2-1.png\" alt=\"\" class=\"wp-image-1498\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/2-1.png 602w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/2-1-300x126.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/2-1-600x251.png 600w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"605\" height=\"227\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/3-1.png\" alt=\"\" class=\"wp-image-1499\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/3-1.png 605w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/3-1-300x113.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2020\/05\/3-1-600x225.png 600w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">KillMode=process\u7684\u610f\u601d\u662f\u5f53\u505c\u6b62docker\u5b88\u62a4\u8fdb\u7a0b\u65f6\u53ea\u505c\u6389\u4e3b\u8fdb\u7a0b\uff0c\u800c\u4e3b\u8fdb\u7a0b\u4ea7\u751f\u7684\u5b50\u8fdb\u7a0b\u662f\u4e0d\u4f1a\u88ab\u505c\u6b62\uff0cSSH\u670d\u52a1\u4e5f\u662f\u8fd9\u4e2a\u6a21\u5f0f\uff0c\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5f53\u6267\u884csystemctl   stop\/start\/restart  docker\u7684\u65f6\u5019\uff0c\u5185\u90e8\u5bb9\u5668\u4e0d\u4f1a\u53d7\u5230\u5f71\u54cd\uff0c\u4f1a\u7ee7\u7eed\u8fd0\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001live-restore\u9009\u9879\u4ec5\u53ef\u4ee5\u6062\u590d\u91cd\u542f\u524d\u540e\u914d\u7f6e\u76f8\u540c\u7684Daemon\uff0c\u4f8b\u5982\uff0c\u5982\u679cdaemon\u91cd\u542f\u4e4b\u540e\u4f7f\u7528\u4e86\u4e0d\u540c\u7684\u7f51\u6865IP\u5730\u5740\u6216\u8005\u4e0d\u540c\u7684graphdirve,\u5219live-restore\u65e0\u6cd5\u5de5\u4f5c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001Daemon\u957f\u65f6\u95f4\u79bb\u7ebf\u4f1a\u5bf9\u5185\u90e8\u7684\u5bb9\u5668\u4ea7\u751f\u5f71\u54cd\uff0c\u56e0\u4e3a\u5bb9\u5668\u5728\u8fd0\u884c\u7684\u65f6\u5019\u9700\u8981\u5411Daemon\u5199\u5165\u65e5\u5fd7\uff0c\u5982\u679cDaemon\u53d8\u5f97\u4e0d\u53ef\u7528\u800c\u65e0\u6cd5\u5904\u7406\u8f93\u51fa\uff0c\u90a3\u4e48\u7f13\u5b58\u5c06\u4f1a\u88ab\u586b\u6ee1\u800c\u5f71\u54cd\u5bb9\u5668\u5199\u5165\u65e5\u5fd7\uff0c\u6b64\u65f6\u9700\u8981\u91cd\u542f\u5bb9\u5668\u6765\u5237\u65b0\u7f13\u5b58\uff0c\u9ed8\u8ba4\u7684\u7f13\u5b58\u4e3a64kb\uff0c\u53ef\u4ee5\u901a\u8fc7\u6539\u53d8\/proc\/sys\/fs\/pipe-max-size\u7684\u503c\u6765\u66f4\u6539\u5185\u6838\u7f13\u5b58\u7684\u5927\u5c0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001live-restore\u9009\u9879\u4e0eDocker Engine Swarm\u6a21\u5f0f\u4e0d\u517c\u5bb9\uff0c\u5f53Docker Engine\u8fd0\u884c\u5728Swarm\u6a21\u5f0f\u4e0b\u65f6\uff0c\u7f16\u6392\u529f\u80fd\u7ba1\u7406\u4efb\u52a1\u65e0\u6cd5\u4f7f\u5bb9\u5668\u6839\u636e\u670d\u52a1\u89c4\u8303\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6309\u7167Docker\u7684\u8bbe\u8ba1\uff0c\u5f53\u901a\u8fc7systemctl stop docker \u547d\u4ee4\u505c\u6b62docker\u6216\u8005docker [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-1497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1497"}],"version-history":[{"count":3,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1497\/revisions"}],"predecessor-version":[{"id":12295,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/1497\/revisions\/12295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/1500"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}