{"id":10254,"date":"2022-08-21T10:03:55","date_gmt":"2022-08-21T02:03:55","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=10254"},"modified":"2022-08-21T16:42:24","modified_gmt":"2022-08-21T08:42:24","slug":"docker-and-vm","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/docker-and-vm.html","title":{"rendered":"\u3010Docker\u3011\u5bb9\u5668\u3001\u865a\u62df\u673a\u4e0eDocker\u6982\u5ff5\u5168\u89e3\u6790"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nDocker\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u5e94\u7528\u5bb9\u5668\u5f15\u64ce\uff0c\u8ba9\u5f00\u53d1\u8005\u53ef\u4ee5\u6253\u5305\u4ed6\u4eec\u7684\u5e94\u7528\u4ee5\u53ca\u4f9d\u8d56\u5305\u5230\u4e00\u4e2a\u53ef\u79fb\u690d\u7684\u5bb9\u5668\u4e2d\uff0c\u7136\u540e\u53d1\u5e03\u5230\u4efb\u4f55\u6d41\u884c\u7684Linux\u673a\u5668\u4e0a\uff0c\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u865a\u62df\u5316\u3002\u672c\u6587\u7acb\u8db3\u4e8e\u65b0\u624b\uff0c\u4ece\u5bb9\u5668\u548c\u865a\u62df\u673a\u4e24\u4e2a\u5927\u7684\u6982\u5ff5\u5165\u624b\uff0c\u7531\u6d45\u5165\u6df1\uff0c\u7531\u5b8f\u8f6c\u5fae\uff0c\u4e3a\u6211\u4eec\u89e3\u6790\u4e86Docker\u7684\u65b9\u65b9\u9762\u9762\u3002\u6765\u5427\u670b\u53cb\u4eec\uff0c\u7406\u89e3\u5b83\uff0c\u70ed\u7231\u5b83\uff0c\u7136\u540e\u66f4\u597d\u5730\u4f7f\u7528\u5b83\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

 <\/p>\n

\"small-Docker\"<\/p>\n

\u4f5c\u4e3a\u7a0b\u5e8f\u5458\u6216\u8005\u6280\u672f\u4eba\u5458\uff0c\u5927\u5bb6\u80af\u5b9a\u542c\u8bf4\u8fc7Docker\u7684\u9f0e\u9f0e\u5927\u540d\u2014\u2014\u8fd9\u6b3e\u5de5\u5177\u80fd\u591f\u5e2e\u52a9\u6211\u4eec\u9ad8\u6548\u6253\u5305\u3001\u53d1\u5e03\u53ca\u8fd0\u884c\u627f\u8f7d\u7740\u5e94\u7528\u7a0b\u5e8f\u7684\u201c\u5bb9\u5668\u201d\u7cfb\u7edf\u3002\u5176\u53d1\u5c55\u5982\u706b\u5982\u837c\u2014\u2014\u4ece\u5f00\u53d1\u8005\u5230\u8fd0\u7ef4\u4eba\u5458\uff0c\u6bcf\u4e2a\u4eba\u90fd\u5728\u5173\u6ce8\u7740\u8fd9\u4f4d\u6280\u672f\u65b0\u8d35\u3002\u5373\u4f7f\u662f\u50cf\u8c37\u6b4c\u3001VMware\u4e0eAmazon\u8fd9\u6837\u7684\u6280\u672f\u5de8\u64d8\u4e5f\u5728\u6784\u5efa\u76f8\u5173\u670d\u52a1\u4e3a\u5176\u63d0\u4f9b\u652f\u6301\u3002<\/p>\n

\u65e0\u8bba\u5927\u5bb6\u662f\u5426\u6709\u610f\u7acb\u5373\u4f7f\u7528Docker\uff0c\u6211\u4eec\u90fd\u5e94\u5f53\u5bf9\u5176\u57fa\u7840\u6982\u5ff5\u52a0\u4ee5\u4e86\u89e3\uff0c\u5e76\u660e\u786e\u533a\u5206\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u4e4b\u95f4\u7684\u5dee\u5f02\u6240\u5728\u3002\u76ee\u524d\u7f51\u7edc\u4e0a\u5df2\u7ecf\u5b58\u5728\u5927\u91cf\u5bf9\u4e8c\u8005\u5173\u8054\u4e0e\u533a\u522b\u7684\u9610\u8ff0\u6027\u6587\u7ae0\uff0c\u4e0d\u8fc7\u5728\u4eca\u5929\u7684\u7efc\u8ff0\u4e2d\uff0c\u6211\u4eec\u5c06\u7acb\u8db3\u4e8e\u65b0\u624b\u5bf9\u5176\u52a0\u4ee5\u5256\u6790\u3002<\/p>\n

\u4e0b\u9762\u9996\u5148\u804a\u804a\u865a\u62df\u673a\u4e0e\u5bb9\u5668\u7a76\u7adf\u662f\u4ec0\u4e48?<\/p>\n

\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u7a76\u7adf\u662f\u4ec0\u4e48\uff1f<\/strong><\/div>\n

\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u62e5\u6709\u7740\u7c7b\u4f3c\u7684\u4f7f\u547d\uff1a\u5bf9\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u5173\u8054\u6027\u8fdb\u884c\u9694\u79bb\uff0c\u4ece\u800c\u6784\u5efa\u8d77\u4e00\u5957\u80fd\u591f\u968f\u5904\u8fd0\u884c\u7684\u81ea\u5bb9\u7eb3\u5355\u5143\u3002<\/p>\n

\u6b64\u5916\uff0c\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u8fd8\u6446\u8131\u4e86\u5bf9\u7269\u7406\u786c\u4ef6\u7684\u9700\u6c42\uff0c\u5141\u8bb8\u6211\u4eec\u66f4\u4e3a\u9ad8\u6548\u5730\u4f7f\u7528\u8ba1\u7b97\u8d44\u6e90\uff0c\u4ece\u800c\u63d0\u5347\u80fd\u6e90\u6548\u7387\u4e0e\u6210\u672c\u6548\u76ca\u3002<\/p>\n

\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u4e4b\u95f4\u7684\u6838\u5fc3\u5dee\u5f02\u5728\u4e8e\u5176\u67b6\u6784\u65b9\u6cd5\u3002\u4e0b\u9762\u4e00\u8d77\u8fdb\u884c\u6df1\u5165\u4e86\u89e3\u3002<\/p>\n

\u865a\u62df\u673a<\/strong><\/div>\n

\u865a\u62df\u673a\u5728\u672c\u8d28\u4e0a\u5c31\u662f\u5728\u6a21\u62df\u4e00\u53f0\u771f\u5b9e\u7684\u8ba1\u7b97\u673a\u8bbe\u5907\uff0c\u540c\u65f6\u9075\u5faa\u540c\u6837\u7684\u7a0b\u5e8f\u6267\u884c\u65b9\u5f0f\u3002\u865a\u62df\u673a\u80fd\u591f\u5229\u7528\u201c\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u201d\u8fd0\u884c\u5728\u7269\u7406\u8bbe\u5907\u4e4b\u4e0a\u3002\u53cd\u8fc7\u6765\uff0c\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u5219\u53ef\u8fd0\u884c\u5728\u4e3b\u673a\u8bbe\u5907\u6216\u8005\u201c\u88f8\u673a\u201d\u4e4b\u4e0a\u3002<\/p>\n

\u4e0b\u9762\u7528\u66f4\u76f4\u767d\u7684\u8868\u8fbe\u6765\u8bf4\u660e\uff1a<\/p>\n

\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u53ef\u8868\u73b0\u4e3a\u8f6f\u4ef6\u3001\u56fa\u4ef6\u6216\u8005\u786c\u4ef6\uff0c\u5e76\u4f5c\u4e3a\u865a\u62df\u673a\u7684\u8fd0\u884c\u57fa\u7840\u3002\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u672c\u8eab\u8fd0\u884c\u5728\u7269\u7406\u8ba1\u7b97\u673a\u4e4b\u4e0a\uff0c\u6211\u4eec\u4e5f\u5c06\u8fd9\u79cd\u5e95\u5c42\u786c\u4ef6\u79f0\u4e3a\u201c\u4e3b\u673a\u8bbe\u5907\u201d\u3002\u4e3b\u673a\u8bbe\u5907\u4e3a\u865a\u62df\u673a\u63d0\u4f9b\u8d44\u6e90\uff0c\u5305\u62ec\u5185\u5b58\u4e0eCPU\u3002\u8fd9\u4e9b\u8d44\u6e90\u7531\u4e0d\u540c\u865a\u62df\u673a\u5171\u4eab\uff0c\u5e76\u6839\u636e\u9700\u8981\u8fdb\u884c\u968f\u610f\u5206\u914d\u3002\u56e0\u6b64\u5982\u679c\u4e00\u5957\u865a\u62df\u673a\u8fd0\u884c\u6709\u9700\u6c42\u5927\u91cf\u8d44\u6e90\u7684\u9ad8\u5f3a\u5ea6\u5e94\u7528\u7a0b\u5e8f\uff0c\u90a3\u4e48\u6211\u4eec\u53ef\u4ee5\u5728\u540c\u4e00\u4e3b\u673a\u8bbe\u5907\u4e0a\u4e3a\u5176\u5206\u914d\u8fdc\u9ad8\u4e8e\u5176\u5b83\u865a\u62df\u673a\u7684\u8d44\u6e90\u914d\u989d\u3002<\/p>\n

\u8fd0\u884c\u5728\u4e3b\u673a\u8bbe\u5907\u4e0a\u7684\u865a\u62df\u673a\uff08\u5f53\u7136\uff0c\u9700\u8981\u914d\u5408\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\uff09\u901a\u5e38\u88ab\u79f0\u4e3a\u4e00\u5957\u201c\u5ba2\u6237\u673a\u201d\u3002\u8fd9\u5957\u5ba2\u6237\u673a\u5bb9\u7eb3\u6709\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u8fd0\u884c\u6240\u5fc5\u9700\u7684\u5404\u7c7b\u7ec4\u4ef6\uff08\u4f8b\u5982\u7cfb\u7edf\u4e8c\u8fdb\u5236\u6587\u4ef6\u53ca\u5e93\uff09\u3002\u5b83\u540c\u65f6\u8fd8\u5305\u542b\u6709\u5b8c\u6574\u7684\u865a\u62df\u786c\u4ef6\u5806\u6808\uff0c\u5176\u4e2d\u5305\u62ec\u865a\u62df\u7f51\u7edc\u9002\u914d\u5668\u3001\u5b58\u50a8\u4ee5\u53caCPU\u2014\u2014\u8fd9\u610f\u5473\u7740\u5b83\u4e5f\u62e5\u6709\u81ea\u5df1\u7684\u5b8c\u6574\u8bbf\u5ba2\u64cd\u4f5c\u7cfb\u7edf\u3002\u7740\u773c\u4e8e\u5185\u90e8\uff0c\u8fd9\u5957\u5ba2\u6237\u673a\u81ea\u6210\u4f53\u7cfb\u5e76\u62e5\u6709\u4e13\u7528\u8d44\u6e90\u3002\u800c\u4ece\u5916\u90e8\u6765\u770b\uff0c\u8fd9\u5957\u865a\u62df\u673a\u4f7f\u7528\u7684\u5219\u662f\u7531\u4e3b\u673a\u8bbe\u5907\u63d0\u4f9b\u7684\u5171\u4eab\u8d44\u6e90\u3002<\/p>\n

\u5982\u4e0a\u6240\u8ff0\uff0c\u5ba2\u6237\u673a\u53ef\u4ee5\u8fd0\u884c\u4e3b\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u6216\u8005\u88f8\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u3002\u4e8c\u8005\u4e4b\u95f4\u5b58\u5728\u7740\u591a\u79cd\u91cd\u8981\u533a\u522b\u3002<\/p>\n

\u9996\u5148\uff0c\u4e3b\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u8fd0\u884c\u5728\u4e3b\u673a\u8bbe\u5907\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e0a\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u4e00\u53f0\u8fd0\u884c\u6709OS X\u7684\u8ba1\u7b97\u673a\u53ef\u4ee5\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e0a\u5b89\u88c5\u865a\u62df\u673a\uff08\u4f8b\u5982VirtualBox\u6216\u8005VMware Workstation 8\uff09\u3002\u8be5\u865a\u62df\u673a\u5e76\u4e0d\u4f1a\u76f4\u63a5\u8bbf\u95ee\u786c\u4ef6\uff0c\u56e0\u6b64\u5176\u9700\u8981\u7ecf\u7531\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\uff08\u4e5f\u5c31\u662fMac OS X\uff09\u5b9e\u73b0\u8d44\u6e90\u83b7\u53d6\u3002<\/p>\n

\u4e3b\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u7684\u4f18\u52bf\u5728\u4e8e\uff0c\u5176\u57fa\u672c\u6446\u8131\u4e86\u5bf9\u5e95\u5c42\u786c\u4ef6\u7684\u8981\u6c42\u3002\u8be5\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u8d1f\u8d23\u63d0\u4f9b\u786c\u4ef6\u9a71\u52a8\u7a0b\u5e8f\uff0c\u800c\u975e\u7531\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u81ea\u8eab\u63d0\u4f9b\uff0c\u56e0\u6b64\u6211\u4eec\u8ba4\u4e3a\u5176\u5177\u5907\u66f4\u7406\u60f3\u7684\u201c\u786c\u4ef6\u517c\u5bb9\u6027\u201d\u3002\u5728\u53e6\u4e00\u65b9\u9762\uff0c\u8fd9\u79cd\u4ecb\u4e8e\u786c\u4ef6\u4e0e\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u4e4b\u95f4\u7684\u989d\u5916\u5c42\u4f1a\u5e26\u6765\u66f4\u591a\u8d44\u6e90\u6d88\u8017\uff0c\u8fdb\u800c\u964d\u4f4e\u865a\u62df\u673a\u6027\u80fd\u8868\u73b0\u3002<\/p>\n

\u88f8\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u5219\u5c06\u865a\u62df\u673a\u76f4\u63a5\u5b89\u88c5\u5e76\u8fd0\u884c\u5728\u4e3b\u673a\u8bbe\u5907\u786c\u4ef6\u4e4b\u4e0a\u4ee5\u6539\u5584\u6027\u80fd\u8868\u73b0\u3002\u7531\u4e8e\u5176\u76f4\u63a5\u63a5\u5165\u5e95\u5c42\u786c\u4ef6\uff0c\u56e0\u6b64\u6211\u4eec\u4e0d\u518d\u9700\u8981\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u4f5c\u4e3a\u8f85\u52a9\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5728\u786c\u4ef6\u4e0a\u5b89\u88c5\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u5e76\u5c06\u5176\u4f5c\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u3002\u4e0e\u4e3b\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u4e0d\u540c\uff0c\u88f8\u673a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u62e5\u6709\u81ea\u5df1\u7684\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u53ca\u63a5\u53e3\uff0c\u4ece\u800c\u76f4\u63a5\u652f\u6301\u5404\u7c7bI\/O\u3001\u5904\u7406\u6216\u8005\u64cd\u4f5c\u7cfb\u7edf\u7279\u5b9a\u4efb\u52a1\u76f8\u5173\u7ec4\u4ef6\u3002\u8fd9\u79cd\u65b9\u5f0f\u80fd\u591f\u5e26\u6765\u66f4\u7406\u60f3\u7684\u6027\u80fd\u6c34\u5e73\u3001\u53ef\u6269\u5c55\u6027\u4ee5\u53ca\u7a33\u5b9a\u6027\u3002\u4f46\u4ee3\u4ef7\u662f\u5176\u786c\u4ef6\u517c\u5bb9\u6027\u6bd4\u8f83\u6709\u9650\uff0c\u56e0\u4e3a\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u53ea\u80fd\u5305\u542b\u4e00\u90e8\u5206\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u3002<\/p>\n

\u8bf4\u5230\u8fd9\u91cc\uff0c\u5927\u5bb6\u53ef\u80fd\u63d0\u51fa\u7591\u95ee\uff1a\u4e3a\u4ec0\u4e48\u6211\u4eec\u975e\u5f97\u5728\u865a\u62df\u673a\u4e0e\u4e3b\u673a\u8bbe\u5907\u4e4b\u95f4\u6dfb\u52a0\u201c\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u201d\u5462\uff1f<\/p>\n

\u8fd9\u4e2a\u561b\uff0c\u56e0\u4e3a\u865a\u62df\u673a\u672c\u8eab\u62e5\u6709\u4e00\u5957\u865a\u62df\u64cd\u4f5c\u7cfb\u7edf\uff0c\u800c\u865a\u62df\u673a\u7ba1\u7406\u7a0b\u5e8f\u5219\u8d1f\u8d23\u4e3a\u865a\u62df\u673a\u63d0\u4f9b\u5e73\u53f0\u4ee5\u7ba1\u7406\u5e76\u8fd0\u884c\u8fd9\u5957\u8bbf\u5ba2\u64cd\u4f5c\u7cfb\u7edf\u3002\u5982\u6b64\u4e00\u6765\uff0c\u4e3b\u673a\u8ba1\u7b97\u673a\u5c31\u80fd\u591f\u4e3a\u8fd0\u884c\u4e8e\u5176\u4e0a\u7684\u5404\u865a\u62df\u673a\u5206\u914d\u5171\u4eab\u8d44\u6e90\u4e86\u3002<\/p>\n

\"xunijiyuanli\"<\/p>\n

\u865a\u62df\u673a\u539f\u7406\u793a\u610f\u56fe<\/p>\n

\u5982\u5927\u5bb6\u6240\u89c1\uff0c\u865a\u62df\u673a\u4f1a\u5c06\u865a\u62df\u786c\u4ef6\u3001\u5185\u6838\uff08\u5373\u64cd\u4f5c\u7cfb\u7edf\uff09\u4ee5\u53ca\u7528\u6237\u7a7a\u95f4\u6253\u5305\u5728\u65b0\u865a\u62df\u673a\u5f53\u4e2d\u3002<\/p>\n

\u5bb9\u5668<\/strong><\/div>\n

\u4e0e\u63d0\u4f9b\u786c\u4ef6\u865a\u62df\u5316\u673a\u5236\u7684\u865a\u62df\u673a\u4e0d\u540c\uff0c\u5bb9\u5668\u901a\u8fc7\u5bf9\u201c\u7528\u6237\u7a7a\u95f4\u201d\u7684\u62bd\u8c61\u5316\u5904\u7406\u63d0\u4f9b\u64cd\u4f5c\u7cfb\u7edf\u5c42\u7ea7\u7684\u865a\u62df\u5316\u673a\u5236\u3002\u901a\u8fc7\u5bf9\u5bb9\u5668\u8fdb\u884c\u5206\u89e3\uff0c\u5927\u5bb6\u5c06\u53ef\u4ee5\u975e\u5e38\u6e05\u6670\u5730\u7406\u89e3\u5176\u4e2d\u542b\u4e49\u3002<\/p>\n

\u51fa\u4e8e\u5404\u79cd\u8003\u91cf\u4e0e\u9700\u6c42\uff0c\u5bb9\u5668\u5728\u5916\u89c2\u4e0a\u4e0e\u865a\u62df\u673a\u975e\u5e38\u76f8\u4f3c\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u4e8c\u8005\u7686\u62e5\u6709\u4e13\u6709\u5904\u7406\u7a7a\u95f4\u3001\u80fd\u591f\u4f5c\u4e3aroot\u6267\u884c\u547d\u4ee4\u3001\u63d0\u4f9b\u4e13\u6709\u7f51\u7edc\u63a5\u53e3\u4e0eIP\u5730\u5740\u3001\u5141\u8bb8\u5b9a\u5236\u5316\u8def\u7531\u53caiptable\u89c4\u5219\uff0c\u4e14\u53ef\u542f\u52a8\u6587\u4ef6\u7cfb\u7edf\u7b49\u7b49\u3002<\/p>\n

\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u95f4\u7684\u6700\u5927\u533a\u522b\u5728\u4e8e\uff0c\u5404\u5bb9\u5668\u7cfb\u7edf\u5171\u4eab<\/em>\u4e3b\u673a\u7cfb\u7edf\u7684\u5185\u6838\u3002<\/p>\n

\"docker\u67b6\u6784\"<\/p>\n

\u5bb9\u5668\u539f\u7406\u793a\u610f\u56fe<\/p>\n

\u4ee5\u4e0a\u793a\u610f\u56fe\u663e\u793a\u4e86\u5bb9\u5668\u5982\u4f55\u5bf9\u7528\u6237\u7a7a\u95f4\u8fdb\u884c\u6253\u5305\uff0c\u800c\u4e0d\u50cf\u865a\u62df\u673a\u90a3\u6837\u540c\u6837\u5bf9\u5185\u6838\u6216\u8005\u865a\u62df\u786c\u4ef6\u8fdb\u884c\u6253\u5305\u3002\u6bcf\u5957\u5bb9\u5668\u90fd\u62e5\u6709\u81ea\u5df1\u7684\u9694\u79bb\u5316\u7528\u6237\u7a7a\u95f4\uff0c\u4ece\u800c\u4f7f\u5f97\u591a\u5957\u5bb9\u5668\u80fd\u591f\u8fd0\u884c\u5728\u540c\u4e00\u4e3b\u673a\u7cfb\u7edf\u4e4b\u4e0a\u3002\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5168\u90e8\u64cd\u4f5c\u7cfb\u7edf\u5c42\u7ea7\u7684\u67b6\u6784\u90fd\u53ef\u5b9e\u73b0\u8de8\u5bb9\u5668\u5171\u4eab\u3002\u60df\u4e00\u9700\u8981\u72ec\u7acb\u6784\u5efa\u7684\u5c31\u662f\u4e8c\u8fdb\u5236\u6587\u4ef6\u4e0e\u5e93\u3002\u6b63\u56e0\u4e3a\u5982\u6b64\uff0c\u5bb9\u5668\u624d\u62e5\u6709\u6781\u4e3a\u51fa\u8272\u7684\u8f7b\u91cf\u5316\u7279\u6027\u3002<\/p>\n

Docker\u7684\u529f\u80fd\u5b9a\u4f4d<\/strong><\/div>\n

Docker\u4e3a\u57fa\u4e8eLinux\u5bb9\u5668\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u5176\u5229\u7528Linux\u5185\u6838\u4e2d\u7684\u5404\u9879\u529f\u80fd\u2014\u2014\u4f8b\u5982\u547d\u540d\u7a7a\u95f4\u4e0e\u63a7\u5236\u7ec4\u2014\u2014\u4ee5\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e0a\u521b\u5efa\u5bb9\u5668\u3002<\/p>\n

\u5bb9\u5668\u6982\u5ff5\u5e76\u4e0d\u662f\u4ec0\u4e48\u65b0\u9c9c\u4e8b\u7269; \u8c37\u6b4c\u516c\u53f8\u591a\u5e74\u6765\u4e00\u76f4\u5728\u4f7f\u7528\u81ea\u5df1\u5f00\u53d1\u7684\u5bb9\u5668\u6280\u672f\u3002\u5176\u5b83Linux\u5bb9\u5668\u6280\u672f\u65b9\u6848\u8fd8\u5305\u62ecSolaris Zones\u3001BSD jails\u4ee5\u53caLXC\uff0c\u4e14\u5176\u90fd\u5df2\u7ecf\u62e5\u6709\u591a\u5e74\u7684\u53d1\u5c55\u5386\u53f2\u3002<\/p>\n

\u90a3\u4e48\u4e3a\u4ec0\u4e48Docker\u7684\u51fa\u73b0\u4f1a\u5feb\u901f\u5438\u5f15\u5230\u6280\u672f\u4e1a\u754c\u7684\u6ce8\u610f\uff1f<\/p>\n

    \n
  • \u6613\u7528\u6027: Docker\u80fd\u591f\u4e3a\u6f5c\u5728\u53d7\u4f17\u5e26\u6765\u51fa\u8272\u7684\u6613\u7528\u6027\u2014\u2014\u5f00\u53d1\u8005\u3001\u7cfb\u7edf\u7ba1\u7406\u5458\u4ee5\u53ca\u67b6\u6784\u5e08\u7b49\u7b49\u2014\u2014\u4ece\u800c\u5e2e\u52a9\u5176\u5145\u5206\u5229\u7528\u5bb9\u5668\u6280\u672f\u4f18\u52bf\u4ee5\u5feb\u901f\u6784\u5efa\u5e76\u6d4b\u8bd5\u53ef\u79fb\u690d\u5e94\u7528\u7a0b\u5e8f\u3002\u6bcf\u4e2a\u4eba\u90fd\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u7b14\u8bb0\u672c\u4e0a\u6253\u5305\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u5c06\u5176\u76f4\u63a5\u8fd0\u884c\u5728\u4efb\u4f55\u516c\u6709\u4e91\u3001\u79c1\u6709\u4e91\u751a\u81f3\u662f\u88f8\u673a\u4e4b\u4e0a\u3002\u5176\u5ea7\u53f3\u94ed\u662f\uff1a\u4e00\u6b21\u6784\u5efa\uff0c\u968f\u5904\u8fd0\u884c\u3002<\/li>\n
  • \u901f\u5ea6: Docker\u5bb9\u5668\u5177\u5907\u8f7b\u91cf\u5316\u4e0e\u9ad8\u901f\u7279\u6027\u3002\u7531\u4e8e\u5bb9\u5668\u672c\u8eab\u5c5e\u4e8e\u8fd0\u884c\u5728\u5185\u6838\u4e4b\u4e0a\u7684\u6c99\u7bb1\u73af\u5883\uff0c\u56e0\u4e3a\u5176\u5bf9\u8d44\u6e90\u7684\u9700\u6c42\u91cf\u6781\u4f4e\u3002\u5927\u5bb6\u53ef\u4ee5\u5728\u6570\u79d2\u949f\u5185\u5b8c\u6210\u5bb9\u5668\u7684\u521b\u5efa\u4e0e\u8fd0\u884c\uff0c\u800c\u865a\u62df\u673a\u5219\u7531\u4e8e\u9700\u8981\u5f15\u5bfc\u5b8c\u6574\u7684\u865a\u62df\u64cd\u4f5c\u7cfb\u7edf\u800c\u8017\u8d39\u66f4\u591a\u65f6\u95f4\u3002<\/li>\n
  • Docker Hub: Docker\u7528\u6237\u8fd8\u80fd\u591f\u4eab\u53d7\u7531Docker Hub\u5e26\u6765\u7684\u4e30\u5bcc\u751f\u6001\u7cfb\u7edf\u652f\u6301\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5176\u7406\u89e3\u6210\u201cDocker\u955c\u50cf\u7684\u5e94\u7528\u5546\u5e97\u201d\u3002Docker Hub\u63d0\u4f9b\u6210\u5343\u4e0a\u4e07\u7531\u793e\u533a\u5f00\u53d1\u7684\u516c\u5171\u955c\u50cf\uff0c\u4e14\u53ef\u7acb\u5373\u52a0\u4ee5\u4f7f\u7528\u3002\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u6839\u636e\u9700\u8981\u641c\u7d22\u5230\u5408\u9002\u7684\u955c\u50cf\uff0c\u5c06\u5176\u63d0\u53d6\u5e76\u7a0d\u52a0\u4fee\u6539\u5373\u52a0\u4ee5\u4f7f\u7528\u3002<\/li>\n
  • \u6a21\u5757\u6027\u4e0e\u53ef\u6269\u5c55\u6027: Docker\u5141\u8bb8\u6211\u4eec\u8f7b\u677e\u5c06\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u62c6\u5206\u6210\u591a\u4e2a\u72ec\u7acb\u5bb9\u5668\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u81ea\u5df1\u7684Postgres\u6570\u636e\u5e93\u8fd0\u884c\u5728\u4e00\u5957\u5bb9\u5668\u5f53\u4e2d\uff0c\u5e76\u5c06Redis\u670d\u52a1\u5668\u8fd0\u884c\u5728\u53e6\u4e00\u5bb9\u5668\u5185\uff0c\u800cNode.js\u4e5f\u62e5\u6709\u81ea\u5df1\u7684\u5bb9\u5668\u7cfb\u7edf\u3002\u5728Docker\u7684\u5e2e\u52a9\u4e0a\uff0c\u5927\u5bb6\u80fd\u591f\u8f7b\u677e\u5c06\u8fd9\u4e9b\u5bb9\u5668\u5bf9\u63a5\u8d77\u6765\u4ee5\u521b\u5efa\u5b8c\u6574\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u5c31\u8ba9\u672a\u6765\u7684\u89c4\u6a21\u4f38\u7f29\u6216\u8005\u7ec4\u4ef6\u66f4\u65b0\u5f97\u4ee5\u901a\u8fc7\u76f8\u4e92\u72ec\u7acb\u7684\u65b9\u5f0f\u5b8c\u6210\u3002<\/li>\n<\/ul>\n

    \u6700\u540e\u4f46\u540c\u6837\u91cd\u8981\u7684\u662f\uff0cDocker\u9cb8\u9c7c\u5b9e\u5728\u662f\u592a\u60f9\u4eba\u559c\u7231\u4e86\uff5e<\/p>\n

    \"docker\"<\/p>\n

    Docker\u57fa\u672c\u6982\u5ff5<\/strong><\/div>\n

    \u73b0\u5728\u6211\u4eec\u5bf9Docker\u6709\u4e86\u5b8f\u89c2\u5370\u8c61\uff0c\u4e0b\u9762\u5177\u4f53\u5bf9\u5176\u7ec4\u4ef6\u8fdb\u884c\u89e3\u8bfb\uff1a<\/p>\n

    \"docker\u5185\u90e8\u673a\u5236\"<\/p>\n

    Docker Engine<\/strong><\/span><\/div>\n

    Docker Engine\u5c5e\u4e8eDocker\u7684\u8fd0\u884c\u5c42\u3002\u8fd9\u662f\u4e00\u5957\u8f7b\u91cf\u5316\u8fd0\u884c\u65f6\u53ca\u5de5\u5177\u7ec4\u5408\uff0c\u8d1f\u8d23\u7ba1\u7406\u5bb9\u5668\u3001\u955c\u50cf\u3001\u6784\u5efa \u7b49\u7b49\u3002\u5b83\u4ee5\u539f\u751f\u65b9\u5f0f\u8fd0\u884c\u5728Linux\u7cfb\u7edf\u4e4b\u4e0a\uff0c\u5e76\u7531\u4ee5\u4e0b\u5143\u7d20\u6784\u6210\uff1a<\/p>\n

    Docker Daemon\uff0c\u8fd0\u884c\u5728\u4e3b\u673a\u8ba1\u7b97\u673a\u4e4b\u4e0a\u3002
    \nDocker Client\uff0c\u8d1f\u8d23\u4e0eDocker Daemon\u901a\u4fe1\u4ee5\u6267\u884c\u547d\u4ee4\u3002
    \nREST API\uff0c\u7528\u4e8e\u540cDocker Daemon\u8fdc\u7a0b\u4ea4\u4e92\u3002<\/p>\n

    Docker Client<\/strong><\/span><\/div>\n

    Docker Client\u6b63\u662f\u6211\u4eec\u4f5c\u4e3a\u6700\u7ec8\u7528\u6237\u7684\u901a\u4fe1\u5bf9\u8c61\u3002\u6211\u4eec\u53ef\u4ee5\u5c06\u5176\u89c6\u4e3aDocker\u7684UI\u3002<\/p>\n

    \u6211\u4eec\u8fdb\u884c\u7684\u4e00\u5207\u64cd\u4f5c\u90fd\u5c06\u76f4\u63a5\u63a5\u5165Docker Client\uff0c\u518d\u7531\u5176\u5c06\u6307\u4ee4\u4f20\u9012\u81f3Docker Daemon\u3002<\/p>\n

    Docker Daemon<\/strong><\/span><\/div>\n

    Docker Daemon\u76f4\u63a5\u5c06\u6267\u884c\u547d\u4ee4\u53d1\u9001\u81f3Docker Client\u2014\u2014\u4f8b\u5982\u6784\u5efa\u3001\u8fd0\u884c\u4ee5\u53ca\u5206\u53d1\u7b49\u7b49\u3002Docker Daemon\u8fd0\u884c\u5728\u4e3b\u673a\u8bbe\u5907\u4e4b\u4e0a\uff0c\u4f46\u4f5c\u4e3a\u7528\u6237\uff0c\u6211\u4eec\u6c38\u8fdc\u4e0d\u4f1a\u76f4\u63a5\u4e0e\u8be5Daemon\u8fdb\u884c\u901a\u4fe1\u3002Docker Client\u4e5f\u53ef\u4ee5\u8fd0\u884c\u5728\u4e3b\u673a\u8bbe\u5907\u4e0a\uff0c\u4f46\u5e76\u975e\u5fc5\u9700\u3002\u5b83\u4ea6\u80fd\u591f\u8fd0\u884c\u5728\u53e6\u4e00\u53f0\u8bbe\u5907\u4e0a\uff0c\u5e76\u4e0e\u8fd0\u884c\u5728\u76ee\u6807\u4e3b\u673a\u4e0a\u7684Docker Daemon\u8fdb\u884c\u8fdc\u7a0b\u901a\u4fe1\u3002<\/p>\n

    Dockerfile<\/strong><\/span><\/div>\n

    Dockerfile\u662f\u6211\u4eec\u7f16\u5199\u6307\u4ee4\u4ee5\u6784\u5efaDocker\u955c\u50cf\u7684\u8f7d\u4f53\u3002\u8fd9\u4e9b\u6307\u4ee4\u5305\u62ec\uff1a
    \nRUN apt-get y install some-package:\u5b89\u88c5\u67d0\u8f6f\u4ef6\u5305
    \nEXPOSE 8000: \u5f00\u653e\u7aef\u53e3
    \nENV ANT_HOME \/usr\/local\/apache-ant\uff1a\u4f20\u9012\u73af\u5883\u53d8\u91cf<\/p>\n

    \u7c7b\u4f3c\u7684\u6307\u4ee4\u8fd8\u6709\u5f88\u591a\u3002\u4e00\u65e6\u8bbe\u7f6e\u4e86Dockerfile\uff0c\u5927\u5bb6\u5c31\u53ef\u4ee5\u5229\u7528docker build\u547d\u4ee4\u6765\u6784\u5efa\u955c\u50cf\u4e86\u3002\u4e0b\u9762\u6765\u770bDockerfile\u793a\u4f8b\uff1a<\/p>\n

    # Start with ubuntu 14.04\r\nFROM ubuntu:14.04MAINTAINER preethi kasireddy iam.preethi.k@gmail.com# For SSH access and port redirection\r\nENV ROOTPASSWORD sample# Turn off prompts during installations\r\nENV DEBIAN_FRONTEND noninteractive\r\nRUN echo \"debconf shared\/accepted-oracle-license-v1-1 select true\" | debconf-set-selections\r\nRUN echo \"debconf shared\/accepted-oracle-license-v1-1 seen true\" | debconf-set-selections# Update packages\r\nRUN apt-get -y update# Install system tools \/ libraries\r\nRUN apt-get -y install python3-software-properties \\\r\nsoftware-properties-common \\\r\nbzip2 \\\r\nssh \\\r\nnet-tools \\\r\nvim \\\r\ncurl \\\r\nexpect \\\r\ngit \\\r\nnano \\\r\nwget \\\r\nbuild-essential \\\r\ndialog \\\r\nmake \\\r\nbuild-essential \\\r\ncheckinstall \\\r\nbridge-utils \\\r\nvirt-viewer \\\r\npython-pip \\\r\npython-setuptools \\\r\npython-dev\r\n\r\n# Install Node, npm\r\nRUN curl -sL https:\/\/deb.nodesource.com\/setup_4.x | sudo -E bash -\r\nRUN apt-get install -y nodejs\r\n\r\n# Add oracle-jdk7 to repositories\r\nRUN add-apt-repository ppa:webupd8team\/java\r\n\r\n# Make sure the package repository is up to date\r\nRUN echo \"deb http:\/\/archive.ubuntu.com\/ubuntu precise main universe\" > \/etc\/apt\/sources.list\r\n\r\n# Update apt\r\nRUN apt-get -y update\r\n\r\n# Install oracle-jdk7\r\nRUN apt-get -y install oracle-java7-installer\r\n\r\n# Export JAVA_HOME variable\r\nENV JAVA_HOME \/usr\/lib\/jvm\/java-7-oracle\r\n\r\n# Run sshd\r\nRUN apt-get install -y openssh-server\r\nRUN mkdir \/var\/run\/sshd\r\nRUN echo \"root:$ROOTPASSWORD\" | chpasswd\r\nRUN sed -i 's\/PermitRootLogin without-password\/PermitRootLogin yes\/' \/etc\/ssh\/sshd_config\r\n\r\n# SSH login fix. Otherwise user is kicked off after login\r\nRUN sed 's@session\\s*required\\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i \/etc\/pam.d\/sshd\r\n\r\n# Expose Node.js app port\r\nEXPOSE 8000\r\n\r\n# Create tap-to-android app directory\r\nRUN mkdir -p \/usr\/src\/my-app\r\nWORKDIR \/usr\/src\/my-app\r\n\r\n# Install app dependencies\r\nCOPY . \/usr\/src\/my-app\r\nRUN npm install\r\n\r\n# Add entrypoint\r\nADD entrypoint.sh \/entrypoint.sh\r\nRUN chmod +x \/entrypoint.sh\r\nENTRYPOINT [\"\/entrypoint.sh\"]\r\n\r\nCMD [\"npm\", \"start\"]<\/pre>\n

    \u793a\u4f8bDockerfile<\/p>\n

    Docker\u955c\u50cf<\/strong><\/span><\/div>\n

    \u955c\u50cf\u5c5e\u4e8e\u53ea\u8bfb\u6a21\u677f\uff0c\u5927\u5bb6\u53ef\u4ee5\u501f\u6b64\u914d\u5408Dockerfile\u4e2d\u7684\u7f16\u5199\u6307\u4ee4\u96c6\u8fdb\u884c\u5bb9\u5668\u6784\u5efa\u3002\u955c\u50cf\u5b9a\u4e49\u4e86\u6253\u5305\u7684\u5e94\u7528\u7a0b\u5e8f\u4ee5\u53ca\u5176\u76f8\u5173\u4f9d\u8d56\u3002\u8fd9\u4e9b\u4f9d\u8d56\u5c31\u597d\u50cf\u662f\u5176\u542f\u52a8\u65f6\u9700\u8981\u8fd0\u884c\u7684\u8fdb\u7a0b\u3002<\/p>\n

    Docker\u955c\u50cf\u5229\u7528Dockerfile\u5b9e\u73b0\u6784\u5efa\u3002Dockerfile\u4e2d\u7684\u6bcf\u6761\u6307\u4ee4\u90fd\u4f1a\u5728\u955c\u50cf\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u201c\u5c42\u201d\uff0c\u8fd9\u4e9b\u5c42\u5219\u8868\u73b0\u4e3a\u955c\u50cf\u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u5206\u533a\u2014\u2014\u6211\u4eec\u53ef\u4ee5\u5bf9\u5176\u8fdb\u884c\u6dfb\u52a0\u6216\u8005\u66ff\u6362\u3002\u5c42\u6982\u5ff5\u6b63\u662fDocker\u8f7b\u91cf\u5316\u7684\u57fa\u7840\u3002Docker\u5229\u7528\u4e00\u5957Union File System\u5efa\u7acb\u8d77\u8fd9\u5957\u5f3a\u5927\u7684\u7ed3\u6784\uff1a<\/p>\n

    Union File System<\/strong><\/span><\/div>\n

    Docker\u5229\u7528Union File System\u4ee5\u6784\u5efa\u955c\u50cf\u3002\u5927\u5bb6\u53ef\u4ee5\u5c06Union File System\u89c6\u4e3a\u4e00\u5957\u53ef\u5806\u53e0\u6587\u4ef6\u7cfb\u7edf\uff0c\u8fd9\u610f\u5473\u7740\u5404\u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u4e0e\u76ee\u5f55\uff08\u5728Docker\u4e2d\u88ab\u79f0\u4e3a\u5206\u652f\uff09\u53ef\u4ee5\u900f\u660e\u65b9\u5f0f\u8986\u76d6\u5e76\u6784\u6210\u5355\u4e00\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n

    \u8986\u76d6\u5206\u652f\u5185\u7684\u5404\u76ee\u5f55\u5185\u5bb9\u62e5\u6709\u540c\u6837\u7684\u8def\u5f84\uff0c\u5e76\u5c06\u88ab\u89c6\u4e3a\u5355\u4e00\u5408\u5e76\u76ee\u5f55\uff0c\u8fd9\u5c31\u907f\u514d\u4e86\u9700\u8981\u4e3a\u6bcf\u4e2a\u5c42\u5206\u522b\u521b\u5efa\u526f\u672c\u7684\u9ebb\u70e6\u3002\u76f8\u53cd\uff0c\u8fd9\u4e9b\u76ee\u5f55\u53ef\u8c03\u7528\u7279\u5b9a\u6307\u9488\u4ee5\u6307\u5411\u540c\u6837\u7684\u8d44\u6e90; \u5f53\u7279\u5b9a\u5c42\u9700\u8981\u8fdb\u884c\u4fee\u6539\u65f6\uff0c\u5176\u4f1a\u5206\u522b\u521b\u5efa\u4fee\u6539\u524d\u4e0e\u4fee\u6539\u540e\u7684\u672c\u5730\u526f\u672c\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6587\u4ef6\u7cfb\u7edf\u8868\u73b0<\/em>\u51fa\u53ef\u5199\u5165\u7279\u6027\uff0c\u4f46\u5176\u5b9e\u9645\u4e0a\u5e76\u672a\u63a5\u53d7\u4efb\u4f55\u5199\u5165\u64cd\u4f5c\u3002\uff08\u6362\u8a00\u4e4b\uff0c\u8fd9\u662f\u4e00\u5957\u2018\u5199\u5165\u5373\u590d\u5236\u2019\u7cfb\u7edf\u3002\uff09<\/p>\n

    \u5206\u5c42\u7cfb\u7edf\u62e5\u6709\u4e24\u5927\u6838\u5fc3\u4f18\u52bf\uff1a<\/p>\n

    \u65e0\u91cd\u590d\u6570\u636e: \u5206\u5c42\u673a\u5236\u4f7f\u5f97\u6211\u4eec\u5728\u4f7f\u7528\u955c\u50cf\u521b\u5efa\u5e76\u8fd0\u884c\u65b0\u5bb9\u5668\u65f6\u65e0\u9700\u590d\u5236\u5b8c\u6574\u7684\u6587\u4ef6\u96c6\uff0c\u4ece\u800c\u4fdd\u8bc1Docker\u5bb9\u5668\u5b9e\u4f8b\u62e5\u6709\u826f\u597d\u7684\u8fd0\u884c\u901f\u5ea6\u4e0e\u4f4e\u5ec9\u7684\u8d44\u6e90\u6210\u672c\u3002
    \n\u5c42\u9694\u79bb: \u53d8\u66f4\u64cd\u4f5c\u901f\u5ea6\u5f88\u5feb\u2014\u2014\u5f53\u6211\u4eec\u5bf9\u955c\u50cf\u8fdb\u884c\u53d8\u66f4\u65f6\uff0cDocker\u53ea\u9700\u8981\u5bf9\u8fdb\u884c\u4e86\u53d8\u66f4\u7684\u5c42\u8fdb\u884c\u5e7f\u64ad\u3002<\/p>\n

    Volumes<\/strong><\/span><\/div>\n

    Volumes\u5c5e\u4e8e\u5bb9\u5668\u4e2d\u7684\u201c\u6570\u636e\u201d\u90e8\u5206\uff0c\u4f1a\u5728\u5bb9\u5668\u521b\u5efa\u65f6\u8fdb\u884c\u521d\u59cb\u5316\u3002Volumes\u673a\u5236\u5141\u8bb8\u6211\u4eec\u6301\u4e45\u4fdd\u7559\u5e76\u5171\u4eab\u5bb9\u5668\u6570\u636e\u3002\u6570\u636e\u5377 \u72ec\u7acb\u4e8e\u9ed8\u8ba4Union File System\u4e4b\u5916\uff0c\u4e14\u4f5c\u4e3a\u666e\u901a\u76ee\u5f55\u53ca\u6587\u4ef6\u5b58\u5728\u4e8e\u4e3b\u673a\u6587\u4ef6\u7cfb\u7edf\u5f53\u4e2d\u3002\u56e0\u6b64\u5373\u4f7f\u662f\u5728\u5bf9\u5bb9\u5668\u8fdb\u884c\u9500\u6bc1\u3001\u66f4\u65b0\u6216\u8005\u91cd\u6784\u65f6\uff0c\u6570\u636e\u5377\u4ecd\u7136\u4e0d\u53d7\u5f71\u54cd\u3002\u5f53\u6211\u4eec\u9700\u8981\u5bf9\u67d0\u4e00\u6570\u636e\u5377\u8fdb\u884c\u66f4\u65b0\u65f6\uff0c\u76f4\u63a5\u52a0\u4ee5\u53d8\u66f4\u5373\u53ef\u3002\uff08\u4f5c\u4e3a\u53e6\u4e00\u9879\u4f18\u52bf\uff0c\u6570\u636e\u5377\u8fd8\u80fd\u591f\u5728\u4e0d\u540c\u5bb9\u5668\u4e4b\u95f4\u8fdb\u884c\u5171\u4eab\u4e0e\u590d\u7528\u3002\uff09<\/p>\n

    Docker\u5bb9\u5668<\/strong><\/span><\/div>\n

    \u5982\u4e0a\u6240\u8ff0\uff0cDocker\u5bb9\u5668\u5c06\u4e00\u6b3e\u5e94\u7528\u7a0b\u5e8f\u7684\u8f6f\u4ef6\u6253\u5305\u5728\u5355\u4e00\u73af\u5883\u5f53\u4e2d\uff0c\u540c\u65f6\u5305\u542b\u5168\u90e8\u8fd0\u884c\u5fc5\u9700\u7684\u8981\u7d20\u3002\u5176\u4e2d\u5305\u62ec\u64cd\u4f5c\u7cfb\u7edf\u3001\u5e94\u7528\u7a0b\u5e8f\u4ee3\u7801\u3001\u8fd0\u884c\u65f6\u3001\u7cfb\u7edf\u5de5\u5177\u3001\u7cfb\u7edf\u5e93\u7b49\u7b49\u3002Docker\u5bb9\u5668\u7531Docker\u955c\u50cf\u6784\u5efa\u800c\u6210\u3002\u7531\u4e8e\u955c\u50cf\u5b58\u5728\u53ea\u8bfb\u5c5e\u6027\uff0c\u56e0\u6b64Docker\u4f1a\u5728\u955c\u50cf\u5728\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u4e4b\u4e0a\u6dfb\u52a0\u4e00\u5957\u8bfb\u53d6-\u5199\u5165\u6587\u4ef6\u7cfb\u7edf\u4ee5\u5b9e\u73b0\u5bb9\u5668\u521b\u5efa\u3002<\/p>\n

    \u53e6\u5916\uff0c\u5728\u521b\u5efa\u5bb9\u5668\u65f6\uff0cDocker\u8fd8\u4f1a\u521b\u5efa\u4e00\u5957\u7f51\u7edc\u63a5\u53e3\u4ee5\u5e2e\u52a9\u5bb9\u5668\u540c\u672c\u5730\u4e3b\u673a\u901a\u4fe1\u3001\u5bf9\u63a5\u53ef\u7528IP\u5730\u5740\u5e76\u6267\u884c\u7528\u6237\u5728\u5b9a\u4e49\u955c\u50cf\u65f6\u6240\u6267\u884c\u7684\u8fdb\u7a0b\u4ee5\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002
    \n\u5728\u6210\u529f\u521b\u5efa\u4e86\u4e00\u5957\u5bb9\u5668\u4e4b\u540e\uff0c\u6211\u4eec\u968f\u540e\u53ef\u4ee5\u5c06\u5176\u8fd0\u884c\u5728\u4efb\u4f55\u73af\u5883\u5f53\u4e2d\uff0c\u800c\u4e0d\u5fc5\u518d\u505a\u4efb\u4f55\u53d8\u66f4\u3002<\/p>\n

    \u201c\u5bb9\u5668\u201d\u63ed\u79d8<\/strong><\/div>\n

    \u6253\u5f00\u5bb9\u5668\uff0c\u6211\u4eec\u4f1a\u53d1\u73b0\u5176\u4e2d\u5305\u542b\u5927\u91cf\u6d3b\u52a8\u7ec4\u4ef6\u3002\u5bb9\u5668\u7684\u5b9e\u73b0\u673a\u5236\u4e00\u76f4\u4ee4\u6211\u611f\u5230\u60ca\u8bb6\u800c\u597d\u5947\uff0c\u7279\u522b\u662f\u8003\u8651\u5230\u5bb9\u5668\u4e0d\u5b58\u5728\u4efb\u4f55\u62bd\u8c61\u7684\u57fa\u7840\u8bbe\u65bd\u8fb9\u754c\u3002\u5728\u9605\u8bfb\u4e86\u5927\u91cf\u6750\u6599\u4e4b\u540e\uff0c\u6211\u5c06\u7ed3\u5408\u81ea\u5df1\u7684\u7406\u89e3\u4e3a\u5927\u5bb6\u8fdb\u884c\u8bb2\u89e3\uff1a\uff09<\/p>\n

    \u201c\u5bb9\u5668\u201d\u8fd9\u4e00\u672f\u8bed\u5176\u5b9e\u53ea\u662f\u4e2a\u62bd\u8c61\u6982\u5ff5\uff0c\u7528\u4e8e\u8868\u8ff0\u591a\u79cd\u4e0d\u540c\u7684\u76f8\u5173\u7279\u6027\uff0c\u800c\u5176\u4e0e\u539f\u8bcd\u201ccontainer\u201d\u7684\u53e6\u4e00\u542b\u4e49\u201c\u96c6\u88c5\u7bb1\u201d\u6709\u7740\u5343\u4e1d\u4e07\u7f15\u7684\u8054\u7cfb\u3002\u4e0b\u9762\u5c31\u6765\u4e00\u8d77\u4e86\u89e3\uff1a<\/p>\n

    \u547d\u540d\u7a7a\u95f4<\/strong><\/span><\/div>\n

    \u547d\u540d\u7a7a\u95f4\u4e3a\u5bb9\u5668\u63d0\u4f9b\u5bf9\u5e94\u7684\u5e95\u5c42Linux\u7cfb\u7edf\u89c6\u56fe\uff0c\u5373\u9650\u5236\u5bb9\u5668\u7684\u67e5\u770b\u4e0e\u8bbf\u95ee\u8303\u7574\u3002\u5f53\u6211\u4eec\u8fd0\u884c\u4e00\u5957\u5bb9\u5668\u65f6\uff0cDocker\u4f1a\u521b\u5efa\u591a\u4e2a\u547d\u540d\u7a7a\u95f4\u4f9b\u7279\u5b9a\u5bb9\u5668\u4f7f\u7528\u3002
    \nDocker\u4f1a\u5728\u5185\u6838\u4e2d\u4f7f\u7528\u591a\u79cd\u4e0d\u540c\u7c7b\u578b\u7684\u547d\u540d\u7a7a\u95f4\uff0c\u4f8b\u5982\uff1a<\/p>\n