{"id":201543,"date":"2020-09-29T09:09:12","date_gmt":"2020-09-29T01:09:12","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=201543"},"modified":"2020-09-23T14:09:47","modified_gmt":"2020-09-23T06:09:47","slug":"docker-pros-cons","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/docker-pros-cons.html","title":{"rendered":"Docker\u7684\u4f18\u7f3a\u70b9"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nDocker \u4e3b\u8981\u89e3\u51b3\u73af\u5883\u914d\u7f6e\u95ee\u9898\uff0c\u5b83\u662f\u4e00\u79cd\u865a\u62df\u5316\u6280\u672f\uff0c\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u9694\u79bb\uff0c\u88ab\u9694\u79bb\u7684\u8fdb\u7a0b\u72ec\u7acb\u4e8e\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\u548c\u5176\u5b83\u9694\u79bb\u7684\u8fdb\u7a0b\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
Docker\u89e3\u51b3\u7684\u95ee\u9898\uff1a<\/strong><\/div>\n

\u7531\u4e8e\u4e0d\u540c\u7684\u673a\u5668\u6709\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u4ee5\u53ca\u4e0d\u540c\u7684\u5e93\u548c\u7ec4\u4ef6\uff0c\u5728\u5c06\u4e00\u4e2a\u5e94\u7528\u90e8\u7f72\u5230\u591a\u53f0\u673a\u5668\u4e0a\u9700\u8981\u8fdb\u884c\u5927\u91cf\u7684\u73af\u5883\u914d\u7f6e\u64cd\u4f5c\u3002<\/p>\n

Docker \u4e3b\u8981\u89e3\u51b3\u73af\u5883\u914d\u7f6e\u95ee\u9898\uff0c\u5b83\u662f\u4e00\u79cd\u865a\u62df\u5316\u6280\u672f\uff0c\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u9694\u79bb\uff0c\u88ab\u9694\u79bb\u7684\u8fdb\u7a0b\u72ec\u7acb\u4e8e\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\u548c\u5176\u5b83\u9694\u79bb\u7684\u8fdb\u7a0b\u3002\u4f7f\u7528 Docker \u53ef\u4ee5\u4e0d\u4fee\u6539\u5e94\u7528\u7a0b\u5e8f\u4ee3\u7801\uff0c\u4e0d\u9700\u8981\u5f00\u53d1\u4eba\u5458\u5b66\u4e60\u7279\u5b9a\u73af\u5883\u4e0b\u7684\u6280\u672f\uff0c\u5c31\u80fd\u591f\u5c06\u73b0\u6709\u7684\u5e94\u7528\u7a0b\u5e8f\u90e8\u7f72\u5728\u5176\u5b83\u673a\u5668\u4e0a\u3002<\/p>\n

\"\"<\/p>\n

\u4e0e\u865a\u62df\u673a\u7684\u6bd4\u8f83:<\/strong><\/div>\n

\u865a\u62df\u673a\u4e5f\u662f\u4e00\u79cd\u865a\u62df\u5316\u6280\u672f\uff0c\u5b83\u4e0e Docker \u6700\u5927\u7684\u533a\u522b\u5728\u4e8e\u5b83\u662f\u901a\u8fc7\u6a21\u62df\u786c\u4ef6\uff0c\u5e76\u5728\u786c\u4ef6\u4e0a\u5b89\u88c5\u64cd\u4f5c\u7cfb\u7edf\u6765\u5b9e\u73b0\u3002<\/p>\n

\"\"<\/p>\n

\u542f\u52a8\u901f\u5ea6<\/strong><\/div>\n

\u542f\u52a8\u865a\u62df\u673a\u9700\u8981\u5148\u542f\u52a8\u865a\u62df\u673a\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u518d\u542f\u52a8\u5e94\u7528\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u975e\u5e38\u6162\uff1b<\/p>\n

\u800c\u542f\u52a8 Docker \u76f8\u5f53\u4e8e\u542f\u52a8\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u7684\u4e00\u4e2a\u8fdb\u7a0b\u3002<\/p>\n

\u5360\u7528\u8d44\u6e90<\/strong><\/div>\n

\u865a\u62df\u673a\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u9700\u8981\u5360\u7528\u5927\u91cf\u7684\u78c1\u76d8\u3001\u5185\u5b58\u548c CPU \u8d44\u6e90\uff0c\u4e00\u53f0\u673a\u5668\u53ea\u80fd\u5f00\u542f\u51e0\u5341\u4e2a\u7684\u865a\u62df\u673a\u3002<\/p>\n

\u800c Docker \u53ea\u662f\u4e00\u4e2a\u8fdb\u7a0b\uff0c\u53ea\u9700\u8981\u5c06\u5e94\u7528\u4ee5\u53ca\u76f8\u5173\u7684\u7ec4\u4ef6\u6253\u5305\uff0c\u5728\u8fd0\u884c\u65f6\u5360\u7528\u5f88\u5c11\u7684\u8d44\u6e90\uff0c\u4e00\u53f0\u673a\u5668\u53ef\u4ee5\u5f00\u542f\u6210\u5343\u4e0a\u4e07\u4e2a Docker\u3002<\/p>\n

\u955c\u50cf\u4e0e\u5bb9\u5668:<\/strong><\/div>\n

\u955c\u50cf\u662f\u4e00\u79cd\u9759\u6001\u7684\u7ed3\u6784\uff0c\u53ef\u4ee5\u770b\u6210\u9762\u5411\u5bf9\u8c61\u91cc\u9762\u7684\u7c7b\uff0c\u800c\u5bb9\u5668\u662f\u955c\u50cf\u7684\u4e00\u4e2a\u5b9e\u4f8b\u3002<\/p>\n

\u955c\u50cf\u5305\u542b\u7740\u5bb9\u5668\u8fd0\u884c\u65f6\u6240\u9700\u8981\u7684\u4ee3\u7801\u4ee5\u53ca\u5176\u5b83\u7ec4\u4ef6\uff0c\u5b83\u662f\u4e00\u79cd\u5206\u5c42\u7ed3\u6784\uff0c\u6bcf\u4e00\u5c42\u90fd\u662f\u53ea\u8bfb\u7684\uff08read-only layers\uff09\u3002\u6784\u5efa\u955c\u50cf\u65f6\uff0c\u4f1a\u4e00\u5c42\u4e00\u5c42\u6784\u5efa\uff0c\u524d\u4e00\u5c42\u662f\u540e\u4e00\u5c42\u7684\u57fa\u7840\u3002\u955c\u50cf\u7684\u8fd9\u79cd\u5206\u5c42\u5b58\u50a8\u7ed3\u6784\u5f88\u9002\u5408\u955c\u50cf\u7684\u590d\u7528\u4ee5\u53ca\u5b9a\u5236\u3002<\/p>\n

\u6784\u5efa\u5bb9\u5668\u65f6\uff0c\u901a\u8fc7\u5728\u955c\u50cf\u7684\u57fa\u7840\u4e0a\u6dfb\u52a0\u4e00\u4e2a\u53ef\u5199\u5c42\uff08writable layer\uff09\uff0c\u7528\u6765\u4fdd\u5b58\u7740\u5bb9\u5668\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u7684\u4fee\u6539\u3002<\/p>\n

\u4f18\u7f3a\u70b9:<\/strong><\/div>\n
1. \u90e8\u7f72\u65b9\u4fbf<\/strong><\/span><\/div>\n

\u4f60\u4e00\u5b9a\u8fd8\u6709\u5370\u8c61\uff0c\u5728\u6211\u4eec\u6700\u5f00\u59cb\u5b66\u4e60\u7f16\u7a0b\u7684\u65f6\u5019\uff0c\u642d\u5efa\u73af\u5883\u8fd9\u4e00\u6b65\u5f80\u5f80\u4f1a\u8017\u8d39\u6211\u4eec\u597d\u51e0\u4e2a\u5c0f\u65f6\u7684\u65f6\u95f4\uff0c\u800c\u4e14\u5176\u4e2d\u4e00\u4e2a\u5c0f\u95ee\u9898\u53ef\u80fd\u9700\u8981\u627e\u5f88\u4e45\u624d\u80fd\u591f\u89e3\u51b3\u3002\u4f60\u8fd8\u4f1a\u5f97\u5230\u5173\u4e8e\u73af\u5883\u642d\u5efa\u65b9\u9762\u7684\u56e2\u961f\u5176\u4ed6\u6210\u5458\u7684\u6c42\u52a9\u3002\u800c\u6709\u4e86\u5bb9\u5668\u4e4b\u540e\uff0c\u8fd9\u4e9b\u90fd\u53d8\u5f97\u975e\u5e38\u5bb9\u6613\uff0c\u4f60\u7684\u5f00\u53d1\u73af\u5883\u5c31\u53ea\u662f\u4e00\u4e2a\u6216\u8005\u51e0\u4e2a\u5bb9\u5668\u955c\u50cf\u7684\u5730\u5740\uff0c\u6700\u591a\u518d\u9700\u8981\u4e00\u4e2a\u63a7\u5236\u90e8\u7f72\u6d41\u7a0b\u7684\u6267\u884c\u811a\u672c\u3002\u6216\u8005\u8fdb\u4e00\u6b65\u5c06\u4f60\u7684\u73af\u5883\u955c\u50cf\u4ee5\u53ca\u955c\u50cf\u811a\u672c\u653e\u5165\u4e00\u4e2agit\u9879\u76ee\uff0c\u53d1\u5e03\u5230\u4e91\u7aef\uff0c\u9700\u8981\u7684\u65f6\u5019\u5c06\u5b83\u62c9\u5230\u672c\u5730\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n

# git clone https:\/\/github.com\/my-project  \r\n# sh .\/my-build-boot.sh \r\n<\/pre>\n

\u76ee\u524d\u6211\u4eec\u56e2\u961f\u76ee\u524d\u57fa\u672c\u90fd\u662f\u7528\u8fd9\u79cd\u65b9\u6848\u642d\u5efa\u672c\u5730\u5f00\u53d1\u73af\u5883\uff0c\u800c\u4e14\u6574\u7406\u6210\u5185\u90e8\u6280\u672f\u6587\u6863\uff0c\u6162\u6162\u6c89\u6dc0\u6210\u56e2\u961f\u7684\u8d22\u5bcc\u4e86\u3002<\/p>\n

2. \u90e8\u7f72\u5b89\u5168<\/strong><\/span><\/div>\n

\u5f53\u6211\u4eec\u6536\u5230\u4e00\u4e2abug\u53cd\u9988\u7684\u65f6\u5019\uff0c\u5f88\u591a\u65f6\u5019\u5fc3\u91cc\u9762\u7684\u7b2c\u4e00\u53cd\u5e94\u4e00\u5b9a\u662f\u201c\u6211\u672c\u5730\u662f\u597d\u7684\u554a\u201d\uff01\u8fd9\u79cd\u60c5\u51b5\u7684\u53d1\u751f\u5c31\u5728\u4e8e\u73af\u5883\u7684\u4e0d\u4e00\u81f4\uff0c\u6211\u4eec\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7684\u8c03\u8bd5\u5f80\u5f80\u4e0d\u80fd\u4fdd\u8bc1\u5176\u4ed6\u73af\u5883\u7684\u95ee\u9898\uff0c\u4f46\u662f\u6211\u4eec\u5374\u8981\u4e3a\u6b64\u4e70\u5355\uff0c\u8fd9\u771f\u662f\u4e00\u4ef6\u4ee4\u4eba\u82e6\u607c\u7684\u4e8b\u60c5\u3002\u6709\u4e86\u5bb9\u5668\u4e4b\u540e\uff0c\u8fd9\u5c06\u5f88\u5c11\u53d1\u751f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5bb9\u5668\u6280\u672f\u5c06\u5f00\u53d1\u73af\u5883\u548c\u6d4b\u8bd5\u73af\u5883\u4ee5\u53ca\u751f\u4ea7\u73af\u5883\u4fdd\u6301\u7248\u672c\u548c\u4f9d\u8d56\u4e0a\u7684\u7edf\u4e00\uff0c\u4fdd\u8bc1\u4ee3\u7801\u5728\u4e00\u4e2a\u9ad8\u5ea6\u7edf\u4e00\u7684\u73af\u5883\u4e0a\u6267\u884c\u3002\u800c\u6d4b\u8bd5\u73af\u5883\u7684\u7edf\u4e00\uff0c\u4e5f\u540c\u6837\u80fd\u89e3\u51b3CI\u6d41\u7a0b\u5bf9\u73af\u5883\u7684\u8981\u6c42\u3002<\/p>\n

\u5206\u5e03\u5f0f\u6280\u672f\u548c\u6269\u5bb9\u9700\u6c42\u65e5\u76ca\u589e\u957f\u7684\u4eca\u5929\uff0c\u5982\u679c\u8fd0\u7ef4\u80fd\u591f\u4f7f\u7528\u5bb9\u5668\u6280\u672f\u6765\u8fdb\u884c\u73af\u5883\u7684\u90e8\u7f72\uff0c\u4e0d\u4ec5\u4ec5\u5728\u90e8\u7f72\u65f6\u95f4\u4e0a\u8282\u7701\u4e0d\u5c11\uff0c\u4e5f\u80fd\u628a\u5f88\u591a\u56e0\u4e3a\u4eba\u5de5\u914d\u7f6e\u73af\u5883\u4ea7\u751f\u7684\u5931\u8bef\u964d\u5230\u6700\u4f4e\u3002<\/p>\n

3. \u9694\u79bb\u6027\u597d<\/strong><\/span><\/div>\n

\u4e0d\u7ba1\u662f\u5f00\u53d1\u8fd8\u662f\u751f\u4ea7\uff0c\u5f80\u5f80\u6211\u4eec\u4e00\u53f0\u673a\u5668\u4e0a\u53ef\u80fd\u9700\u8981\u8dd1\u591a\u4e2a\u670d\u52a1\uff0c\u800c\u670d\u52a1\u5404\u81ea\u9700\u8981\u7684\u4f9d\u8d56\u914d\u7f6e\u4e0d\u5c3d\u76f8\u540c\uff0c\u5047\u5982\u8bf4\u4e24\u4e2a\u5e94\u7528\u9700\u8981\u4f7f\u7528\u540c\u4e00\u4e2a\u4f9d\u8d56\uff0c\u6216\u8005\u4e24\u4e2a\u5e94\u7528\u9700\u8981\u7684\u4f9d\u8d56\u4e4b\u95f4\u4f1a\u6709\u4e00\u4e9b\u51b2\u7a81\uff0c\u8fd9\u4e2a\u65f6\u5019\u5c31\u5f88\u5bb9\u6613\u51fa\u73b0\u95ee\u9898\u4e86\u3002\u6240\u4ee5\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u4e0d\u540c\u5e94\u7528\u63d0\u4f9b\u7684\u4e0d\u540c\u670d\u52a1\uff0c\u6700\u597d\u8fd8\u662f\u5c06\u5176\u9694\u79bb\u8d77\u6765\u3002\u800c\u5bb9\u5668\u5728\u8fd9\u65b9\u9762\u6709\u5929\u751f\u7684\u4f18\u52bf\uff0c\u6bcf\u4e00\u4e2a\u5bb9\u5668\u5c31\u662f\u4e00\u4e2a\u9694\u79bb\u7684\u73af\u5883\uff0c\u4f60\u5bf9\u5bb9\u5668\u5185\u90e8\u63d0\u4f9b\u670d\u52a1\u7684\u8981\u6c42\uff0c\u5bb9\u5668\u53ef\u4ee5\u81ea\u4f9d\u8d56\u7684\u5168\u90e8\u63d0\u4f9b\u3002\u8fd9\u79cd\u9ad8\u5185\u805a\u7684\u8868\u73b0\u53ef\u4ee5\u5b9e\u73b0\u5feb\u901f\u7684\u5206\u79bb\u6709\u95ee\u9898\u7684\u670d\u52a1\uff0c\u5728\u4e00\u4e9b\u590d\u6742\u7cfb\u7edf\u4e2d\u80fd\u5b9e\u73b0\u5feb\u901f\u6392\u9519\u548c\u53ca\u65f6\u5904\u7406\u3002(\u5f53\u7136\u9700\u8981\u8bf4\u660e\u7684\u662f\uff0c\u8fd9\u4e2a\u9694\u79bb\u6027\u53ea\u662f\u76f8\u5bf9\u4e8e\u670d\u52a1\u5668\u6bd4\u8f83\u7684\uff0c\u865a\u673a\u6280\u672f\u8981\u62e5\u6709\u66f4\u597d\u7684\u9694\u79bb\u6027)<\/p>\n

4. \u5feb\u901f\u56de\u6eda<\/strong><\/span><\/div>\n

\u5bb9\u5668\u4e4b\u524d\u7684\u56de\u6eda\u673a\u5236\uff0c\u4e00\u822c\u9700\u8981\u57fa\u4e8e\u4e0a\u4e2a\u7248\u672c\u7684\u5e94\u7528\u91cd\u65b0\u90e8\u7f72\uff0c\u4e14\u66ff\u6362\u6389\u76ee\u524d\u7684\u95ee\u9898\u7248\u672c\u3002\u5728\u6700\u521d\u7684\u65f6\u4ee3\uff0c\u53ef\u80fd\u662f\u4e00\u5957\u5b8c\u6574\u7684\u5f00\u53d1\u5230\u90e8\u7f72\u7684\u6d41\u7a0b\uff0c\u800c\u6267\u884c\u8fd9\u4e00\u5957\u6d41\u7a0b\u5f80\u5f80\u9700\u8981\u5f88\u957f\u7684\u65f6\u95f4\u3002\u5728\u57fa\u4e8egit\u7684\u73af\u5883\u4e2d\uff0c\u53ef\u80fd\u662f\u56de\u9000\u67d0\u4e2a\u5386\u53f2\u63d0\u4ea4\uff0c\u7136\u540e\u91cd\u65b0\u90e8\u7f72\u3002\u8fd9\u4e9b\u8ddf\u5bb9\u5668\u6280\u672f\u76f8\u6bd4\u90fd\u4e0d\u591f\u5feb\uff0c\u800c\u4e14\u53ef\u80fd\u4f1a\u5f15\u8d77\u65b0\u7684\u95ee\u9898\uff08\u56e0\u4e3a\u662f\u57fa\u4e8e\u65b0\u7248\u672c\u7684\u4fee\u6539\uff09\u3002\u800c\u5bb9\u5668\u6280\u672f\u5929\u751f\u5e26\u6709\u56de\u6eda\u5c5e\u6027\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u5386\u53f2\u5bb9\u5668\u6216\u8005\u955c\u50cf\u90fd\u4f1a\u6709\u4fdd\u5b58\uff0c\u800c\u66ff\u6362\u4e00\u4e2a\u5bb9\u5668\u6216\u8005\u67d0\u4e2a\u5386\u53f2\u955c\u50cf\u662f\u975e\u5e38\u5feb\u901f\u548c\u7b80\u5355\u7684\u3002<\/p>\n

5. \u6210\u672c\u4f4e<\/strong><\/span><\/div>\n

\u8fd9\u53ef\u80fd\u662f\u4e00\u4e2a\u6700\u660e\u663e\u548c\u6709\u7528\u7684\u4f18\u70b9\u4e86\uff0c\u5728\u5bb9\u5668\u51fa\u73b0\u4e4b\u524d\uff0c\u6211\u4eec\u5f80\u5f80\u6784\u7b51\u4e00\u4e2a\u5e94\u7528\u5c31\u9700\u8981\u4e00\u53f0\u65b0\u7684\u670d\u52a1\u5668\u6216\u8005\u4e00\u53f0\u865a\u673a\u3002\u670d\u52a1\u5668\u7684\u8d2d\u7f6e\u6210\u672c\u548c\u8fd0\u7ef4\u6210\u672c\u90fd\u5f88\u9ad8\uff0c\u800c\u865a\u673a\u9700\u8981\u5360\u7528\u5f88\u591a\u4e0d\u5fc5\u8981\u7684\u8d44\u6e90\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u5bb9\u5668\u6280\u672f\u5c31\u5c0f\u5de7\u8f7b\u4fbf\u7684\u591a\uff0c\u53ea\u9700\u8981\u7ed9\u4e00\u4e2a\u5bb9\u5668\u5185\u90e8\u6784\u5efa\u5e94\u7528\u9700\u8981\u7684\u4f9d\u8d56\u5c31\u53ef\u4ee5\u4e86\uff0c\u8fd9\u4e5f\u662f\u5bb9\u5668\u6280\u672f\u53d1\u5c55\u8fc5\u901f\u7684\u6700\u4e3b\u8981\u539f\u56e0\u3002<\/p>\n

6. \u7ba1\u7406\u6210\u672c\u66f4\u4f4e<\/strong><\/span><\/div>\n

\u968f\u7740\u5bb9\u5668\u6280\u672f\u7684\u4e0d\u65ad\u666e\u53ca\u548c\u53d1\u5c55\uff0c\u968f\u4e4b\u800c\u6765\u7684\u5bb9\u5668\u7ba1\u7406\u548c\u7f16\u6392\u6280\u672f\u4e5f\u540c\u6837\u5f97\u5230\u53d1\u5c55\u3002\u8bf8\u5982Docker Swarm\uff0cKubernetes, Mesos\u7b49\u7f16\u6392\u5de5\u5177\u4e5f\u5728\u4e0d\u65ad\u7684\u8fed\u4ee3\u66f4\u65b0\uff0c\u8fd9\u8ba9\u5bb9\u5668\u6280\u672f\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u62e5\u6709\u4e86\u66f4\u591a\u7684\u53ef\u80fd\u6027\u548c\u66f4\u5927\u7684\u53d1\u6325\u7a7a\u95f4\u3002\u800c\u968f\u7740\u5927\u73af\u5883\u7684\u53d1\u5c55\uff0cdocker\u7b49\u5bb9\u5668\u7684\u4f7f\u7528\u548c\u5b66\u4e60\u7684\u6210\u672c\u4e5f\u662f\u6108\u53d1\u964d\u4f4e\uff0c\u6210\u4e3a\u66f4\u591a\u5f00\u53d1\u8005\u548c\u4f01\u4e1a\u7684\u9009\u62e9\u3002<\/p>\n

\u8bf4\u4e86\u8fd9\u4e48\u591a\u7684\u4f18\u70b9\uff0c\u5bb9\u5668\u4e5f\u6709\u4e00\u4e9b\u95ee\u9898\u662f\u6ca1\u6709\u89e3\u51b3\u7684\u3002\u4e0a\u4e00\u4ee3\u65b9\u6848\u57fa\u672c\u5c31\u662f\u57fa\u4e8e\u865a\u673a\u6280\u672f\u7684\u4e91\u65b9\u6848\uff0c\u80fd\u6709\u6548\u589e\u52a0\u670d\u52a1\u5668\u7684\u4f7f\u7528\u6548\u7387\uff0c\u8fbe\u5230\u8282\u7701\u6210\u672c\u7684\u76ee\u7684\uff0c\u800c\u5bb9\u5668\u6280\u672f\u5728\u6b64\u57fa\u7840\u4e0a\u66f4\u8fdb\u4e00\u6b65\u5730\u4f18\u5316\u4e86\u8d44\u6e90\u7684\u4f7f\u7528\u7387\u3002\u4f46\u662f\u4ecd\u7136\u6709\u4e00\u4e9b\u95ee\u9898\uff0c\u662f\u6211\u4eec\u5728\u9009\u62e9\u670d\u52a1\u8d44\u6e90\u67b6\u6784\u573a\u666f\u4e2d\u9700\u8981\u8003\u8651\u7684\uff1a<\/p>\n

1.\u9694\u79bb\u6027<\/strong><\/span><\/div>\n

\u57fa\u4e8ehypervisor\u7684\u865a\u673a\u6280\u672f\uff0c\u5728\u9694\u79bb\u6027\u4e0a\u6bd4\u5bb9\u5668\u6280\u672f\u8981\u66f4\u597d\uff0c\u5b83\u4eec\u7684\u7cfb\u7edf\u786c\u4ef6\u8d44\u6e90\u5b8c\u5168\u662f\u865a\u62df\u5316\u7684\uff0c\u5f53\u4e00\u53f0\u865a\u673a\u51fa\u73b0\u7cfb\u7edf\u7ea7\u522b\u7684\u95ee\u9898\uff0c\u5f80\u5f80\u4e0d\u4f1a\u8513\u5ef6\u5230\u540c\u4e00\u5bbf\u4e3b\u673a\u4e0a\u7684\u5176\u4ed6\u865a\u673a\u3002\u4f46\u662f\u5bb9\u5668\u5c31\u4e0d\u4e00\u6837\u4e86\uff0c\u5bb9\u5668\u4e4b\u95f4\u5171\u4eab\u540c\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u4ee5\u53ca\u5176\u4ed6\u7ec4\u4ef6\uff0c\u6240\u4ee5\u5728\u6536\u5230\u653b\u51fb\u4e4b\u7c7b\u7684\u60c5\u51b5\u53d1\u751f\u65f6\uff0c\u66f4\u5bb9\u6613\u901a\u8fc7\u5e95\u5c42\u64cd\u4f5c\u7cfb\u7edf\u5f71\u54cd\u5230\u5176\u4ed6\u5bb9\u5668\u3002\u5f53\u7136\uff0c\u8fd9\u4e2a\u95ee\u9898\u53ef\u4ee5\u901a\u8fc7\u5728\u865a\u673a\u4e2d\u90e8\u7f72\u5bb9\u5668\u6765\u89e3\u51b3\uff0c\u53ef\u662f\u8fd9\u6837\u53c8\u4f1a\u5f15\u51fa\u65b0\u7684\u95ee\u9898\uff0c\u6bd4\u5982\u6210\u672c\u7684\u589e\u52a0\u4ee5\u53ca\u4e0b\u9762\u8981\u63d0\u5230\u7684\u95ee\u9898\uff1a\u6027\u80fd\u3002<\/p>\n

2. \u6027\u80fd<\/strong><\/span><\/div>\n

\u4e0d\u7ba1\u662f\u865a\u673a\u8fd8\u662f\u5bb9\u5668\uff0c\u90fd\u662f\u8fd0\u7528\u4e0d\u540c\u7684\u6280\u672f\uff0c\u5bf9\u5e94\u7528\u672c\u8eab\u8fdb\u884c\u4e86\u4e00\u5b9a\u7a0b\u5ea6\u7684\u5c01\u88c5\u548c\u9694\u79bb\uff0c\u5728\u964d\u4f4e\u5e94\u7528\u548c\u5e94\u7528\u4e4b\u95f4\u4ee5\u53ca\u5e94\u7528\u548c\u73af\u5883\u4e4b\u95f4\u7684\u8026\u5408\u6027\u4e0a\u505a\u4e86\u5f88\u591a\u52aa\u529b\uff0c\u4f46\u662f\u968f\u673a\u800c\u6765\u7684\uff0c\u5c31\u4f1a\u4ea7\u751f\u66f4\u591a\u7684\u7f51\u7edc\u8fde\u63a5\u8f6c\u53d1\u4ee5\u53ca\u6570\u636e\u4ea4\u4e92\uff0c\u8fd9\u5728\u4f4e\u5e76\u53d1\u7cfb\u7edf\u4e0a\u8868\u73b0\u4e0d\u4f1a\u592a\u660e\u663e\uff0c\u800c\u4e14\u5f80\u5f80\u4e0d\u4f1a\u6210\u4e3a\u4e00\u4e2a\u5e94\u7528\u7684\u74f6\u9888\uff08\u53ef\u80fd\u4f1a\u5206\u6563\u4e8e\u4e0d\u540c\u7684\u865a\u673a\u6216\u8005\u670d\u52a1\u5668\u4e0a\uff09\uff0c\u4f46\u662f\u5f53\u540c\u4e00\u865a\u673a\u6216\u8005\u670d\u52a1\u5668\u4e0b\u9762\u7684\u5bb9\u5668\u9700\u8981\u66f4\u9ad8\u5e76\u53d1\u91cf\u652f\u6491\u7684\u65f6\u5019\uff0c\u4e5f\u5c31\u662f\u5e76\u53d1\u95ee\u9898\u6210\u4e3a\u5e94\u7528\u74f6\u9888\u7684\u65f6\u5019\uff0c\u5bb9\u5668\u4f1a\u5c06\u8fd9\u4e2a\u95ee\u9898\u653e\u5927\uff0c\u6240\u4ee5\uff0c\u5e76\u4e0d\u662f\u6240\u6709\u7684\u5e94\u7528\u573a\u666f\u90fd\u662f\u9002\u7528\u4e8e\u5bb9\u5668\u6280\u672f\u7684\u3002<\/p>\n

3. \u5b58\u50a8\u65b9\u6848<\/strong><\/span><\/div>\n

\u5bb9\u5668\u7684\u8bde\u751f\u5e76\u4e0d\u662f\u4e3aOS\u62bd\u8c61\u670d\u52a1\u7684\uff0c\u8fd9\u662f\u5b83\u548c\u865a\u673a\u6700\u5927\u7684\u533a\u522b\uff0c\u8fd9\u6837\u7684\u57fa\u56e0\u610f\u5473\u7740\u5bb9\u5668\u5929\u751f\u662f\u4e3a\u5e94\u7528\u73af\u5883\u505a\u66f4\u591a\u7684\u52aa\u529b\uff0c\u5bb9\u5668\u7684\u4f38\u7f29\u4e5f\u662f\u57fa\u4e8e\u5bb9\u5668\u7684\u8fd9\u4e00disposable\u7279\u6027\uff0c\u800c\u4e0e\u4e4b\u76f8\u5bf9\u7684\uff0c\u9700\u8981\u6301\u4e45\u5316\u5b58\u50a8\u65b9\u6848\u6070\u6070\u76f8\u53cd\u3002\u8fd9\u4e00\u70b9docker\u5bb9\u5668\u63d0\u4f9b\u7684\u89e3\u51b3\u65b9\u6848\u662f\u5229\u7528volume\u63a5\u53e3\u5f62\u6210\u6570\u636e\u7684\u6620\u5c04\u548c\u8f6c\u79fb\uff0c\u4ee5\u5b9e\u73b0\u6570\u636e\u6301\u4e45\u5316\u7684\u76ee\u7684\u3002\u4f46\u662f\u8fd9\u6837\u540c\u6837\u4e5f\u4f1a\u9020\u6210\u4e00\u90e8\u5206\u8d44\u6e90\u7684\u6d6a\u8d39\u548c\u66f4\u591a\u4ea4\u4e92\u7684\u53d1\u751f\uff0c\u4e0d\u7ba1\u662f\u6620\u5c04\u5230\u5bbf\u4e3b\u673a\u4e0a\u8fd8\u662f\u5230\u7f51\u7edc\u78c1\u76d8\uff0c\u90fd\u662f\u9000\u800c\u6c42\u5176\u6b21\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n

\u968f\u7740\u786c\u4ef6\u6280\u672f\u548c\u7f51\u7edc\u6280\u672f\u7684\u8fed\u4ee3\u53d1\u5c55\uff0c\u5bb9\u5668\u6280\u672f\u7684\u7f3a\u70b9\u4f1a\u53d8\u5f97\u8d8a\u6765\u8d8a\u4e0d\u90a3\u4e48\u660e\u663e\uff0c\u800c\u4e14\u968f\u7740\u5bb9\u5668\u6280\u672f\u7684\u53d1\u5c55\u548c\u666e\u53ca\uff0c\u5bf9\u5e94\u7684\u89e3\u51b3\u65b9\u6848\u4e5f\u4f1a\u8d8a\u6765\u8d8a\u591a\u3002\u6240\u4ee5\u603b\u4f53\u6765\u770b\uff0cdocker\u7b49\u5bb9\u5668\u6280\u672f\u4f1a\u671d\u7740\u66f4\u52a0\u666e\u53ca\u7684\u8d8b\u52bf\u8d70\u8fd1\u6211\u4eec\u6280\u672f\u9886\u57df\u3002\u4e5f\u5e0c\u671b\u6bcf\u4e00\u4f4d\u70ed\u7231\u6280\u672f\u7684\u5c0f\u4f19\u4f34\u4eec\u80fd\u66f4\u52a0\u4e86\u89e3\u8fd9\u4e9b\u65b0\u6280\u672f\uff0c\u8ba9\u5b83\u4eec\u80fd\u591f\u66f4\u597d\u7684\u4e3a\u6211\u4eec\u670d\u52a1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Docker \u4e3b\u8981\u89e3\u51b3\u73af\u5883\u914d\u7f6e\u95ee\u9898\uff0c\u5b83\u662f\u4e00\u79cd\u865a\u62df\u5316\u6280\u672f\uff0c\u5bf9\u8fdb\u7a0b\u8fdb\u884c\u9694\u79bb\uff0c\u88ab\u9694\u79bb\u7684\u8fdb\u7a0b\u72ec\u7acb\u4e8e\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\u548c\u5176\u5b83\u9694\u79bb\u7684\u8fdb\u7a0b\u3002<\/p>\n","protected":false},"author":370,"featured_media":110911,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-201543","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/201543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/370"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=201543"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/201543\/revisions"}],"predecessor-version":[{"id":201641,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/201543\/revisions\/201641"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/110911"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=201543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=201543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=201543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}