{"id":17934,"date":"2024-11-18T13:32:23","date_gmt":"2024-11-18T05:32:23","guid":{"rendered":"https:\/\/fwq.ai\/blog\/17934\/"},"modified":"2024-11-18T13:32:23","modified_gmt":"2024-11-18T05:32:23","slug":"docker%e9%95%9c%e5%83%8f%e5%8c%85%e5%90%ab%e4%bb%80%e4%b9%88","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/17934\/","title":{"rendered":"docker\u955c\u50cf\u5305\u542b\u4ec0\u4e48"},"content":{"rendered":"<blockquote><p>\n  docker \u955c\u50cf\u5305\u542b\u4ee5\u4e0b\u5143\u7d20\uff1a\u6587\u4ef6\u7cfb\u7edf\u5c42\uff08\u6839\u6587\u4ef6\u7cfb\u7edf\u3001\u5c42\uff09\u3001\u5143\u6570\u636e\uff08manifest \u6587\u4ef6\u3001\u914d\u7f6e\u3001\u6807\u7b7e\uff09\u3001\u7f51\u7edc\u8bbe\u7f6e\uff08ip \u5730\u5740\u3001\u7aef\u53e3\u6620\u5c04\uff09\u3001\u7528\u6237\u548c\u7ec4\uff08\u7528\u6237 id\u3001\u7ec4 id\uff09\u3001\u547d\u4ee4\uff08\u5165\u53e3\u70b9\u3001cmd\uff09\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/07\/2024040718391835206.jpg\" class=\"aligncenter\" title=\"docker\u955c\u50cf\u5305\u542b\u4ec0\u4e48\u63d2\u56fe\" alt=\"docker\u955c\u50cf\u5305\u542b\u4ec0\u4e48\u63d2\u56fe\" \/><\/p>\n<p><strong>Docker \u955c\u50cf\u5305\u542b\u7684\u5185\u5bb9<\/strong><\/p>\n<p>Docker \u955c\u50cf\u662f\u5305\u542b\u8f6f\u4ef6\u53ca\u5176\u6240\u6709\u4f9d\u8d56\u9879\u7684\u8f7b\u91cf\u7ea7\u53ef\u6267\u884c\u5305\u3002\u5b83\u63d0\u4f9b\u4e86\u5728\u4efb\u4f55\u73af\u5883\u4e2d\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u6240\u9700\u7684\u6240\u6709\u5185\u5bb9\u3002\u5177\u4f53\u6765\u8bf4\uff0cDocker \u955c\u50cf\u5305\u542b\u4ee5\u4e0b\u5143\u7d20\uff1a<\/p>\n<p><strong>1. \u6587\u4ef6\u7cfb\u7edf\u5c42<\/strong><\/p>\n<ul>\n<li> <strong>\u6839\u6587\u4ef6\u7cfb\u7edf\uff1a<\/strong>\u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6240\u9700\u7684\u6839\u6587\u4ef6\u7cfb\u7edf\u6620\u50cf\uff0c\u5305\u62ec\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u5e93\u548c\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<li> <strong>\u5c42\uff1a<\/strong>\u955c\u50cf\u4e2d\u53ef\u4ee5\u7d2f\u79ef\u7684\u5355\u72ec\u6587\u4ef6\u7cfb\u7edf\u5c42\uff0c\u6bcf\u4e2a\u5c42\u90fd\u5305\u542b\u5bf9\u6839\u6587\u4ef6\u7cfb\u7edf\u7684\u589e\u91cf\u66f4\u6539\u3002\u8fd9\u5141\u8bb8\u9ad8\u6548\u5730\u5b58\u50a8\u548c\u66f4\u65b0\u955c\u50cf\u3002<\/li>\n<\/ul>\n<p><strong>2. \u5143\u6570\u636e<\/strong><\/p>\n<ul>\n<li> <strong>JSON \u6587\u4ef6\uff1a<\/strong>\u63cf\u8ff0\u955c\u50cf\u5185\u5bb9\u3001\u5927\u5c0f\u548c\u6807\u7b7e\u7b49\u5143\u6570\u636e\u7684 Manifest \u6587\u4ef6\u3002<\/li>\n<li> <strong>\u914d\u7f6e\uff1a<\/strong>\u6307\u5b9a\u5bb9\u5668\u8fd0\u884c\u914d\u7f6e\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4f8b\u5982\u5165\u53e3\u70b9\u3001\u73af\u5883\u53d8\u91cf\u548c\u5377\u3002<\/li>\n<li> <strong>\u6807\u7b7e\uff1a<\/strong>\u7528\u4e8e\u7ec4\u7ec7\u548c\u6807\u8bc6\u955c\u50cf\u7684\u5143\u6570\u636e\u3002<\/li>\n<\/ul>\n<p><strong>3. \u7f51\u7edc\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li> <strong>IP \u5730\u5740\uff1a<\/strong>\u5206\u914d\u7ed9\u5bb9\u5668\u7684 IP \u5730\u5740\u3002<\/li>\n<li> <strong>\u7aef\u53e3\u6620\u5c04\uff1a<\/strong>\u5c06\u5728\u5bb9\u5668\u5185\u90e8\u516c\u5f00\u7684\u5916\u90e8\u7aef\u53e3\u5230\u5185\u90e8\u7aef\u53e3\u7684\u6620\u5c04\u3002<\/li>\n<\/ul>\n<p><strong>4. \u7528\u6237\u548c\u7ec4<\/strong><\/p>\n<ul>\n<li> <strong>\u7528\u6237 ID \u548c\u7ec4 ID\uff1a<\/strong>\u6307\u5b9a\u5bb9\u5668\u5185\u8fdb\u7a0b\u8fd0\u884c\u7684\u7528\u6237\u548c\u7ec4\u3002<\/li>\n<\/ul>\n<p><strong>5. \u547d\u4ee4<\/strong><\/p>\n<ul>\n<li> <strong>\u5165\u53e3\u70b9\uff1a<\/strong>\u5bb9\u5668\u542f\u52a8\u65f6\u6267\u884c\u7684\u547d\u4ee4\u3002<\/li>\n<li> <strong>CMD\uff1a<\/strong>\u5165\u53e3\u70b9\u7684\u9ed8\u8ba4\u53c2\u6570\u3002<\/li>\n<\/ul>\n<p>Docker \u955c\u50cf\u8fd8\u53ef\u80fd\u5305\u542b\u5176\u4ed6\u5185\u5bb9\uff0c\u5982\u81ea\u5b9a\u4e49\u811a\u672c\u3001\u6570\u636e\u548c\u6587\u6863\u3002\u8fd9\u4e9b\u5143\u7d20\u63d0\u4f9b\u4e86\u989d\u5916\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\uff0c\u5141\u8bb8\u7528\u6237\u6839\u636e\u7279\u5b9a\u9700\u6c42\u5b9a\u5236\u955c\u50cf\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u955c\u50cf\u5305\u542b\u4ec0\u4e48\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>docker \u955c\u50cf\u5305\u542b\u4ee5\u4e0b\u5143\u7d20\uff1a\u6587\u4ef6\u7cfb\u7edf\u5c42\uff08\u6839\u6587\u4ef6\u7cfb\u7edf\u3001\u5c42\uff09\u3001\u5143\u6570\u636e\uff08manifest \u6587\u4ef6\u3001\u914d\u7f6e\u3001\u6807\u7b7e\uff09\u3001\u7f51\u7edc\u8bbe\u7f6e\uff08ip \u5730\u5740\u3001\u7aef\u53e3\u6620\u5c04\uff09\u3001\u7528\u6237\u548c\u7ec4\uff08\u7528\u6237 id\u3001\u7ec4 id\uff09\u3001\u547d\u4ee4\uff08\u5165\u53e3\u70b9\u3001cmd\uff09\u3002 Docker \u955c\u50cf\u5305\u542b\u7684\u5185\u5bb9 Docker \u955c\u50cf\u662f\u5305\u542b\u8f6f\u4ef6\u53ca\u5176\u6240\u6709\u4f9d\u8d56\u9879\u7684\u8f7b\u91cf\u7ea7\u53ef\u6267\u884c\u5305\u3002\u5b83\u63d0\u4f9b\u4e86\u5728\u4efb\u4f55\u73af\u5883\u4e2d\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u6240\u9700\u7684\u6240\u6709\u5185\u5bb9\u3002\u5177\u4f53\u6765\u8bf4\uff0cDocker \u955c\u50cf\u5305\u542b\u4ee5\u4e0b\u5143\u7d20\uff1a 1. \u6587\u4ef6\u7cfb\u7edf\u5c42 \u6839\u6587\u4ef6\u7cfb\u7edf\uff1a\u5e94\u7528\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6240\u9700\u7684\u6839\u6587\u4ef6\u7cfb\u7edf\u6620\u50cf\uff0c\u5305\u62ec\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u5e93\u548c\u914d\u7f6e\u6587\u4ef6\u3002 \u5c42\uff1a\u955c\u50cf\u4e2d\u53ef\u4ee5\u7d2f\u79ef\u7684\u5355\u72ec\u6587\u4ef6\u7cfb\u7edf\u5c42\uff0c\u6bcf\u4e2a\u5c42\u90fd\u5305\u542b\u5bf9\u6839\u6587\u4ef6\u7cfb\u7edf\u7684\u589e\u91cf\u66f4\u6539\u3002\u8fd9\u5141\u8bb8\u9ad8\u6548\u5730\u5b58\u50a8\u548c\u66f4\u65b0\u955c\u50cf\u3002 2. \u5143\u6570\u636e JSON \u6587\u4ef6\uff1a\u63cf\u8ff0\u955c\u50cf\u5185\u5bb9\u3001\u5927\u5c0f\u548c\u6807\u7b7e\u7b49\u5143\u6570\u636e\u7684 Manifest \u6587\u4ef6\u3002 \u914d\u7f6e\uff1a\u6307\u5b9a\u5bb9\u5668\u8fd0\u884c\u914d\u7f6e\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4f8b\u5982\u5165\u53e3\u70b9\u3001\u73af\u5883\u53d8\u91cf\u548c\u5377\u3002 \u6807\u7b7e\uff1a\u7528\u4e8e\u7ec4\u7ec7\u548c\u6807\u8bc6\u955c\u50cf\u7684\u5143\u6570\u636e\u3002 3. \u7f51\u7edc\u8bbe\u7f6e IP \u5730\u5740\uff1a\u5206\u914d\u7ed9\u5bb9\u5668\u7684 IP \u5730\u5740\u3002 \u7aef\u53e3\u6620\u5c04\uff1a\u5c06\u5728\u5bb9\u5668\u5185\u90e8\u516c\u5f00\u7684\u5916\u90e8\u7aef\u53e3\u5230\u5185\u90e8\u7aef\u53e3\u7684\u6620\u5c04\u3002 4. \u7528\u6237\u548c\u7ec4 \u7528\u6237 ID \u548c\u7ec4 ID\uff1a\u6307\u5b9a\u5bb9\u5668\u5185\u8fdb\u7a0b\u8fd0\u884c\u7684\u7528\u6237\u548c\u7ec4\u3002 5. \u547d\u4ee4 \u5165\u53e3\u70b9\uff1a\u5bb9\u5668\u542f\u52a8\u65f6\u6267\u884c\u7684\u547d\u4ee4\u3002 CMD\uff1a\u5165\u53e3\u70b9\u7684\u9ed8\u8ba4\u53c2\u6570\u3002 Docker \u955c\u50cf\u8fd8\u53ef\u80fd\u5305\u542b\u5176\u4ed6\u5185\u5bb9\uff0c\u5982\u81ea\u5b9a\u4e49\u811a\u672c\u3001\u6570\u636e\u548c\u6587\u6863\u3002\u8fd9\u4e9b\u5143\u7d20\u63d0\u4f9b\u4e86\u989d\u5916\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\uff0c\u5141\u8bb8\u7528\u6237\u6839\u636e\u7279\u5b9a\u9700\u6c42\u5b9a\u5236\u955c\u50cf\u3002 \u4ee5\u4e0a\u5c31\u662f\u955c\u50cf\u5305\u542b\u4ec0\u4e48\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-17934","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/17934","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=17934"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/17934\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=17934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=17934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=17934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}