{"id":3514,"date":"2021-03-27T18:14:29","date_gmt":"2021-03-27T10:14:29","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=3514"},"modified":"2023-09-15T10:16:08","modified_gmt":"2023-09-15T02:16:08","slug":"docker-4","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2021\/03\/27\/docker-4\/","title":{"rendered":"\u4ec0\u4e48\u662fDocker?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"> Docker \u4f7f\u7528 Google \u516c\u53f8\u63a8\u51fa\u7684 Go \u8bed\u8a00\u8fdb\u884c\u5f00\u53d1\u5b9e\u73b0\uff0c\u57fa\u4e8e Linux \u5185\u6838\u7684 cgroup\uff0cnamespace\uff0c\u4ee5\u53ca AUFS \u7c7b\u7684 Union FS \u7b49\u6280\u672f\uff0c\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u5c01\u88c5\u9694\u79bb\uff0c\u5c5e\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u5c42\u9762\u7684\u865a\u62df\u5316\u6280\u672f\uff0c \u7531\u4e8e\u9694\u79bb\u7684\u8fdb\u7a0b\u72ec\u7acb\u4e8e\u5bbf\u4e3b\u548c\u5176\u5b83\u7684\u9694\u79bb\u7684\u8fdb\u7a0b\uff0c\u56e0\u6b64\u4e5f\u79f0\u5176\u4e3a\u5bb9\u5668\u3002  \u6700\u521d\u5b9e\u73b0\u662f\u57fa\u4e8e LXC\uff0c\u4ece 0.7 \u7248\u672c\u4ee5\u540e\u5f00\u59cb\u53bb\u9664 LXC\uff0c\u8f6c\u800c\u4f7f\u7528\u81ea\u884c\u5f00\u53d1\u7684 libcontainer\uff0c\u4ece 1.11 \u5f00\u59cb\uff0c\u5219\u8fdb\u4e00\u6b65\u6f14\u8fdb\u4e3a\u4f7f\u7528 runC \u548c containerd\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Docker \u5728\u5bb9\u5668\u7684\u57fa\u7840\u4e0a\uff0c\u8fdb\u884c\u4e86\u8fdb\u4e00\u6b65\u7684\u5c01\u88c5\uff0c\u4ece\u6587\u4ef6\u7cfb\u7edf\u3001\u7f51\u7edc\u4e92\u8054\u5230\u8fdb\u7a0b\u9694\u79bb\u7b49\u7b49\uff0c\u6781\u5927\u7684\u7b80\u5316\u4e86\u5bb9\u5668\u7684\u521b\u5efa\u548c\u7ef4\u62a4\u3002\u4f7f\u5f97 Docker \u6280\u672f\u6bd4\u865a\u62df\u673a\u6280\u672f\u66f4\u4e3a\u8f7b\u4fbf\u3001\u5feb\u6377\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u7684\u56fe\u7247\u6bd4\u8f83\u4e86 Docker \u548c\u4f20\u7edf\u865a\u62df\u5316\u65b9\u5f0f\u7684\u4e0d\u540c\u4e4b\u5904\u3002\u4f20\u7edf\u865a\u62df\u673a\u6280\u672f\u662f\u865a\u62df\u51fa\u4e00\u5957\u786c\u4ef6 \u540e\uff0c\u5728\u5176\u4e0a\u8fd0\u884c\u4e00\u4e2a\u5b8c\u6574\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5728\u8be5\u7cfb\u7edf\u4e0a\u518d\u8fd0\u884c\u6240\u9700\u5e94\u7528\u8fdb\u7a0b\uff1b\u800c\u5bb9\u5668\u5185\u7684\u5e94\u7528\u8fdb\u7a0b \u76f4\u63a5\u8fd0\u884c\u4e8e\u5bbf\u4e3b\u7684\u5185\u6838\uff0c\u5bb9\u5668\u5185\u6ca1\u6709\u81ea\u5df1\u7684\u5185\u6838\uff0c\u800c\u4e14\u4e5f\u6ca1\u6709\u8fdb\u884c\u786c\u4ef6\u865a\u62df\u3002\u56e0\u6b64\u5bb9\u5668\u8981\u6bd4\u4f20\u7edf\u865a\u62df\u673a\u66f4\u4e3a\u8f7b\u4fbf\u3002 <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"277\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/10-1.png\" alt=\"\" class=\"wp-image-3515\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/10-1.png 719w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/10-1-300x116.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/10-1-600x231.png 600w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"713\" height=\"216\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/11-1.png\" alt=\"\" class=\"wp-image-3516\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/11-1.png 713w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/11-1-300x91.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/03\/11-1-600x182.png 600w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">docker\u521b\u5efa\u5bb9\u5668\u8fc7\u7a0b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u4f7f\u7528docker\u6765\u521b\u5efa\u4e00\u4e2a\u5bb9\u5668\u7684\u65f6\u5019\uff0c\u9996\u5148docker\u5c06\u521b\u5efa\u5bb9\u5668\u8bf7\u6c42\u53d1\u9001\u7ed9containerd\uff0ccontained\u6536\u5230\u8bf7\u6c42\u540e\uff0c\u521b\u5efa\u4e00\u4e2acontainerd-shim\u8fdb\u7a0b\uff0c\u7136\u540econtainerd-shim\u8fdb\u7a0b\u8c03\u7528runc\u6765\u521b\u5efa\u5bb9\u5668\uff0c\u521b\u5efa\u5b8c\u5bb9\u5668\u540e\uff0crunc\u8fdb\u7a0b\u9000\u51fa\uff0c\u6b64\u65f6containerd-shim\u5c06\u4f5c\u4e3a\u5bb9\u5668\u7684\u7236\u8fdb\u7a0b\uff0c\u8d1f\u8d23\u7ba1\u7406\u5bb9\u5668\u7684\u72b6\u6001\uff0c\u4e0a\u62a5\u7ed9 containerd, \u5e76\u5728\u5bb9\u5668\u4e2d pid \u4e3a 1 \u7684\u8fdb\u7a0b\u9000\u51fa\u540e\u63a5\u7ba1\u5bb9\u5668\u4e2d\u7684\u5b50\u8fdb\u7a0b\u8fdb\u884c\u6e05\u7406, \u786e\u4fdd\u4e0d\u4f1a\u51fa\u73b0\u50f5\u5c38\u8fdb\u7a0b\uff0c\u67e5\u770b\u662f\u5426\u5b58\u5728containerd-shim\u8fdb\u7a0b\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"150\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/09\/3-6.png\" alt=\"\" class=\"wp-image-14856\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/09\/3-6.png 696w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/09\/3-6-300x65.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/09\/3-6-600x129.png 600w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Docker \u4f7f\u7528 Google \u516c\u53f8\u63a8\u51fa\u7684 Go \u8bed\u8a00\u8fdb\u884c\u5f00\u53d1\u5b9e\u73b0\uff0c\u57fa\u4e8e Linux \u5185\u6838\u7684 cgroup\uff0c [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3517,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,23],"tags":[],"class_list":["post-3514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-rong"],"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\/3514","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=3514"}],"version-history":[{"count":4,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3514\/revisions"}],"predecessor-version":[{"id":14857,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3514\/revisions\/14857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/3517"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}