{"id":29931,"date":"2020-06-16T15:36:38","date_gmt":"2020-06-16T07:36:38","guid":{"rendered":"http:\/\/www.zhushiyao.com\/?p=29931"},"modified":"2020-06-16T16:43:56","modified_gmt":"2020-06-16T08:43:56","slug":"eed1533e00","status":"publish","type":"post","link":"http:\/\/www.zhushiyao.com\/?p=29931","title":{"rendered":"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<section style=\"margin-left: 8px; margin-right: 8px;\">\n<section style=\"display: none;\"><\/section>\n<\/section>\n<section style=\"white-space: normal; font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; font-size: 16px; background-color: #ffffff; text-align: center; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"margin-right: 8px; margin-left: 8px; white-space: normal; font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; background-color: #ffffff; text-align: center;\"><\/section>\n<p style=\"text-align: center; margin-left: 8px; margin-right: 8px; margin-top: 10px;\"><img decoding=\"async\" class=\"rich_pages js_insertlocalimg\" style=\"border-radius: 8px; width: 562px; height: 239px;\" title=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/06\/0-1592292999.jpeg\" alt=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" \/><\/p>\n<section style=\"white-space: normal; background-color: #ffffff; letter-spacing: 0.544px; word-break: normal !important;\">\n<section style=\"letter-spacing: 0.544px; word-break: normal !important;\">\n<section style=\"word-break: normal !important;\">\n<section style=\"letter-spacing: 0.544px; text-align: left; font-size: 16px; margin-left: 8px; margin-right: 8px; word-break: normal !important;\"><span style=\"font-size: 13px; color: #838b83;\">\u6765\u81ea\uff1a\u9a6c\u54e5Linux\u8fd0\u7ef4<\/span><\/section>\n<section style=\"letter-spacing: 0.544px; text-align: center; font-size: 16px; margin-left: 8px; margin-right: 8px; word-break: normal !important;\"><span style=\"color: #d6d6d6; font-size: 13px;\">\u00a0<\/span><\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u662f Golang \u7f16\u5199\u7684\uff0c \u81ea 2013 \u5e74\u63a8\u51fa\u4ee5\u6765\uff0c\u53d7\u5230\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u7684\u5173\u6ce8\u3002\u5982\u679c\u4f60\u5173\u6ce8\u6700\u65b0\u7684\u6280\u672f\u53d1\u5c55\uff0c\u90a3\u4e48\u4f60\u4e00\u5b9a\u542c\u8bf4\u8fc7 Docker\u3002\u4e0d\u7ba1\u662f\u4e91\u670d\u52a1\u8fd8\u662f\u5fae\u670d\u52a1\uff08Microservices\uff09\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u5382\u5546\u90fd\u5f00\u59cb\u57fa\u4e8e Docker \u4f5c\u4e3a\u57fa\u7840\u8bbe\u65bd\u81ea\u52a8\u5316\u7684\u5de5\u5177\u3002\u90a3\u4e48\u4ec0\u4e48\u662f Docker\uff1fDocker\u4e0e\u4f20\u7edf\u7684\u865a\u62df\u673a\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u4e3a\u4f55\u8981\u91c7\u7528 Docker\uff1f\u5982\u4f55\u4f7f\u7528 Docker\uff1f<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u672c\u6587\uff0c\u5c31\u9488\u5bf9\u4e0a\u8ff0\u63d0\u5230\u7684\u95ee\u9898\uff0c\u6765\u7b80\u5355\u4ecb\u7ecd\u4e0b Docker\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px; color: #20b2aa;\"><strong>\u4ec0\u4e48\u662f Docker<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u662f\u5f00\u6e90\u7684\u5e94\u7528\u5bb9\u5668\u5f15\u64ce\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u53ef\u4ee5\u8ba9\u4f60\u5c06\u6240\u6709\u5e94\u7528\u8f6f\u4ef6\u4ee5\u53ca\u5b83\u7684\u4ee5\u6765\u6253\u5305\u6210\u8f6f\u4ef6\u5f00\u53d1\u7684\u6807\u51c6\u5316\u5355\u5143\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u5bb9\u5668\u5c06\u8f6f\u4ef6\u4ee5\u53ca\u5b83\u8fd0\u884c\u5b89\u88c5\u6240\u9700\u7684\u4e00\u5207\u6587\u4ef6\uff08\u4ee3\u7801\u3001\u8fd0\u884c\u65f6\u3001\u7cfb\u7edf\u5de5\u5177\u3001\u7cfb\u7edf\u5e93\uff09\u6253\u5305\u5230\u4e00\u8d77\uff0c\u8fd9\u5c31\u4fdd\u8bc1\u4e86\u4e0d\u7ba1\u662f\u5728\u4ec0\u4e48\u6837\u7684\u8fd0\u884c\u73af\u5883\uff0c\u603b\u662f\u80fd\u4ee5\u76f8\u540c\u7684\u65b9\u5f0f\u8fd0\u884c\u3002\u5c31\u597d\u50cf Java \u865a\u62df\u673a\u4e00\u6837\uff0c\u201c\u4e00\u6b21\u7f16\u5199\uff0c\u5230\u5904\u8fd0\u884c\uff08Write once, run anywhere\uff09\u201d\uff0c\u800c Docker \u662f\u201c\u4e00\u6b21\u6784\u5efa\uff0c\u5230\u5904\u8fd0\u884c\uff08Build once\uff0crun anywhere\uff09\u201d\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" style=\"width: 319px; height: 200px; box-shadow: #aaaaaa 0em 0em 1em 0px;\" title=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/06\/6-1592293005.jpg\" alt=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" \/><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u662f\u4e00\u79cd\u201c\u5bb9\u5668\u5373\u670d\u52a1\u201d\uff08Docker Containers as a Service \uff0c\u7b80\u79f0 CaaS\uff09\uff0c\u4f7f\u5f97\u5f00\u53d1\u548cIT\u8fd0\u8425\u56e2\u961f\u53ef\u4ee5\u5bf9\u4e8e\u5e94\u7528\u7684\u6784\u5efa\u3001\u53d1\u5e03\u3001\u8fd0\u884c\u66f4\u52a0\u654f\u6377\u548c\u53ef\u63a7\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6982\u62ec\u7684\u8bf4\uff1aDocker \u662f\u4e3a\u5f00\u53d1\u4eba\u5458\u548c\u7cfb\u7edf\u7ba1\u7406\u5458\u7528\u4e8e\u6784\u5efa\u3001\u53d1\u5e03\u3001\u5e76\u8fd0\u884c\u5206\u5e03\u5f0f\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u653e\u5f0f\u5e73\u53f0\u3002\u8be5\u5e73\u53f0\u7531 Docker \u5f15\u64ce\uff08\u4e00\u4e2a\u4fbf\u643a\u3001\u8f7b\u5de7\u7684\u8fd0\u884c\u65f6\u548c\u6253\u5305\u5de5\u5177\uff09 \u548c Docker Hub \uff08\u4e00\u4e2a\u5171\u4eab\u5e94\u7528\u7a0b\u5e8f\u548c\u81ea\u52a8\u5316\u5de5\u4f5c\u6d41\u7684\u4e91\u670d\u52a1\uff09\u7b49\u7ec4\u6210\u3002Docker \u53ef\u4ee5\u4f7f\u5e94\u7528\u7a0b\u5e8f\u4ece\u7ec4\u4ef6\u8fc5\u901f\u7ec4\u88c5\u5e76\u6d88\u9664\u4e86\u5f00\u53d1\u3001\u8d28\u91cf\u4fdd\u8bc1\u548c\u751f\u4ea7\u73af\u5883\u4e4b\u95f4\u7684\u6469\u64e6\u95ee\u9898\u3002\u8fd9\u6837\u4e00\u6765\uff0cIT\u90e8\u95e8\u53ef\u4ee5\u66f4\u5feb\u5730\u53d1\u5e03\uff0c\u800c\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u4e0d\u7ba1\u662f\u8fd0\u884c\u5728\u7b14\u8bb0\u672c\u7535\u8111\u3001\u6570\u636e\u4e2d\u5fc3\u7684\u865a\u62df\u673a\uff0c\u8fd8\u662f\u4efb\u4f55\u7684\u4e91\uff0c\u5176\u8fd0\u884c\u8fc7\u7a0b\u548c\u7ed3\u679c\u90fd\u662f\u4e00\u81f4\u7684\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6211\u4eec\u518d\u6765\u770b\u4e0b Docker \u7684 Logo \u3002\u5f88\u660e\u663e\uff0c\u8fd9\u662f\u4e00\u53ea\u9cb8\u9c7c\uff0c\u5b83\u6258\u7740\u8bb8\u591a\u96c6\u88c5\u7bb1\u3002\u6211\u4eec\u53ef\u4ee5\u628a\u5bbf\u4e3b\u673a\u53ef\u5f53\u505a\u8fd9\u53ea\u9cb8\u9c7c\uff0c\u628a\u76f8\u4e92\u9694\u79bb\u7684\u5bb9\u5668\u53ef\u770b\u6210\u96c6\u88c5\u7bb1\uff0c\u6bcf\u4e2a\u96c6\u88c5\u7bb1\u4e2d\u90fd\u5305\u542b\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u8fd9 Logo \u7b80\u76f4\u7684\u592a\u5f62\u8c61\u4e86\uff01<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" style=\"width: 241px; height: 196px; box-shadow: #aaaaaa 0em 0em 1em 0px;\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/eZzl4LXykQy5vHyMdcWrjdPHqficobrOA5hIUU5RhmNYFvqsHFibUicBf4cxkY3krbG3TMZIyDXGDbvE0HT2hfAmg\/640?wx_fmt=png\" \/><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px; color: #20b2aa;\"><strong>Docker \u7684\u4f18\u70b9<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc; margin-left: 8px; margin-right: 8px;\">\n<li>\n<p style=\"text-align: justify;\"><span style=\"font-size: 15px;\">\u8f7b\u91cf\u7ea7\uff1a\u6240\u6709\u5bb9\u5668\u5728\u4e00\u53f0\u673a\u5668\u4e0a\u5171\u4eab\u540c\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\uff0c\u8fd9\u6837\u4ed6\u4eec\u7acb\u5373\u5f00\u59cb\uff0c\u5e76\u66f4\u6709\u6548\u5730\u5229\u7528\u5185\u5b58\u3002Image \u662f\u4ece\u5206\u5c42\u6587\u4ef6\u7cfb\u7edf\u7684\u6784\u5efa\uff0c\u8fd9\u6837\u4ed6\u4eec\u80fd\u591f\u5171\u4eab\u516c\u5171\u6587\u4ef6\uff0c\u4f7f\u5f97\u78c1\u76d8\u4f7f\u7528\u7387\u548c Image \u7684\u4e0b\u8f7d\u66f4\u52a0\u9ad8\u6548\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify;\"><span style=\"font-size: 15px;\">\u5f00\u653e\uff1aDocker \u5bb9\u5668\u662f\u57fa\u4e8e\u5f00\u53d1\u7684\u6807\u51c6\uff0c\u5141\u8bb8\u5bb9\u5668\u8fd0\u884c\u5728\u4e3b\u6d41\u7684 Linux \u53d1\u5e03\u7248\u548c Microsoft \u64cd\u4f5c\u7cfb\u7edf\u4f5c\u4e3a\u6240\u6709\u7684\u57fa\u7840\u8bbe\u65bd\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify;\"><span style=\"font-size: 15px;\">\u5b89\u5168\uff1a\u5bb9\u5668\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u5f7c\u6b64\u9694\u79bb\uff0c\u800c\u57fa\u7840\u67b6\u6784\u540c\u65f6\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u4e86\u989d\u5916\u7684\u4fdd\u62a4\u5c42\u3002<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px; color: #20b2aa;\"><strong>Docker \u4e0e \u865a\u62df\u673a\u7684\u533a\u522b<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u5bb9\u5668\u4e0e\u865a\u62df\u673a\u6709\u7740\u7c7b\u4f3c\u7684\u8d44\u6e90\u9694\u79bb\u548c\u5206\u914d\u7684\u4f18\u70b9\uff0c\u4f46\u4e0d\u540c\u7684\u67b6\u6784\u65b9\u6cd5\u4f7f\u5bb9\u5668\u80fd\u591f\u66f4\u52a0\u4fbf\u643a\uff0c\u9ad8\u6548\u7b49\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px; color: #14c3a1;\"><strong>\u865a\u62df\u673a\u7684\u67b6\u6784<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" style=\"width: 341px; height: 372px; box-shadow: #aaaaaa 0px 0px 14px 0px;\" title=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/06\/9-1592293014.jpg\" alt=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" \/><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6bcf\u4e2a\u865a\u62df\u673a\u90fd\u5305\u62ec\u5e94\u7528\u7a0b\u5e8f\u3001\u5fc5\u8981\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u548c\u5e93\u4ee5\u53ca\u4e00\u4e2a\u5b8c\u6574\u7684\u5ba2\u6237\u64cd\u4f5c\u7cfb\u7edf(Guest OS)\uff0c\u5c3d\u7ba1\u5b83\u4eec\u88ab\u5206\u79bb\uff0c\u5b83\u4eec\u5171\u4eab\u5e76\u5229\u7528\u4e3b\u673a\u7684\u786c\u4ef6\u8d44\u6e90\uff0c\u5c06\u8fd1\u9700\u8981\u5341\u51e0\u4e2a GB \u7684\u5927\u5c0f\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px; color: #14c3a1;\"><strong>\u5bb9\u5668\u7684\u67b6\u6784<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u5bb9\u5668\u5305\u62ec\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u6240\u6709\u7684\u4f9d\u8d56\uff0c\u4f46\u4e0e\u5176\u4ed6\u5bb9\u5668\u5171\u4eab\u5185\u6838\u3002\u5b83\u4eec\u4ee5\u72ec\u7acb\u7684\u7528\u6237\u7a7a\u95f4\u8fdb\u7a0b\u5f62\u5f0f\u8fd0\u884c\u5728\u4e3b\u673a\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u3002\u4ed6\u4eec\u4e5f\u4e0d\u4f9d\u8d56\u4e8e\u4efb\u4f55\u7279\u5b9a\u7684\u57fa\u7840\u8bbe\u65bd\uff0cDocker \u5bb9\u5668\u53ef\u4ee5\u8fd0\u884c\u5728\u4efb\u4f55\u8ba1\u7b97\u673a\u4e0a\uff0c\u4efb\u4f55\u57fa\u7840\u8bbe\u65bd\u548c\u4efb\u4f55\u4e91\u4e0a\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u7684\u5bb9\u5668\u5229\u7528\u4e86 LXC\uff0c\u7ba1\u7406\u5229\u7528\u4e86 namespaces \u6765\u505a\u6743\u9650\u7684\u63a7\u5236\u548c\u9694\u79bb\uff0ccgroups \u6765\u8fdb\u884c\u8d44\u6e90\u7684\u914d\u7f6e\uff0c\u5e76\u4e14\u8fd8\u901a\u8fc7 aufs \u6765\u8fdb\u4e00\u6b65\u63d0\u9ad8\u6587\u4ef6\u7cfb\u7edf\u7684\u8d44\u6e90\u5229\u7528\u7387\uff0c\u800c\u8fd9\u4e9b\u6280\u672f\u90fd\u4e0d\u662f Docker \u72ec\u521b\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px; color: #14c3a1;\"><strong>LXC<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">LXC \u4e0e\u865a\u62df\u673a\u7684\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\uff0c\u5b83\u662f\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7ea7\u522b\u7684\u865a\u62df\u5316\u73af\u5883\uff0c\u800c\u4e0d\u662f\u786c\u4ef6\u865a\u62df\u5316\u73af\u5883\u3002\u4ed6\u4eec\u90fd\u505a\u540c\u6837\u7684\u4e8b\u60c5\uff0c\u4f46 LXC \u662f\u64cd\u4f5c\u7cfb\u7edf\u7ea7\u522b\u7684\u865a\u62df\u5316\u73af\u5883\uff0c\u865a\u62df\u73af\u5883\u6709\u5b83\u81ea\u5df1\u7684\u8fdb\u7a0b\u548c\u7f51\u7edc\u7a7a\u95f4\uff0c\u800c\u4e0d\u662f\u521b\u5efa\u4e00\u4e2a\u5b8c\u6574\u6210\u719f\u7684\u865a\u62df\u673a\u3002\u56e0\u6b64\uff0c\u4e00\u4e2a LXC \u865a\u62df\u64cd\u4f5c\u7cfb\u7edf\u5177\u6709\u6700\u5c0f\u7684\u8d44\u6e90\u9700\u6c42\uff0c\u5e76\u542f\u52a8\u53ea\u9700\u51e0\u79d2\u949f\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6b63\u5982\u4f60\u53ef\u4ee5\u5728\u4e0b\u56fe\u4e2d\u770b\u5230\u7684\uff0c\u5de6\u4fa7\u662f LXC \u865a\u62df\u7684 Ubuntu \uff0c\u9ed8\u8ba4\u5b89\u88c5\u4f7f\u7528 11 MB \u5927\u5c0f\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" style=\"box-shadow: #aaaaaa 0px 0px 14px 0px;\" title=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/06\/9-1592293024.jpg\" alt=\"\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\" \/><\/section>\n<section style=\"text-align: center; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px; color: #20b2aa;\"><strong>Docker \u4e0e Microservices \u7684\u5173\u7cfb<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Microservices\uff08\u5fae\u670d\u52a1\uff09 \u4f9d\u8d56\u4e8e\u201c\u57fa\u7840\u8bbe\u65bd\u81ea\u52a8\u5316\u201d\uff0c\u800c Docker \u6b63\u662f\u201c\u57fa\u7840\u8bbe\u65bd\u81ea\u52a8\u5316\u201d\u7684\u5229\u5668\u3002\u53ef\u4ee5\u8bf4 Docker \u7684\u706b\u7206\uff0c\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u4e5f\u5e26\u52a8\u4e86\u5fae\u670d\u52a1\u67b6\u6784\u7684\u5174\u8d77\uff0c\u800c\u5fae\u670d\u52a1\u7684\u5e7f\u6cdb\u5e94\u7528\u4e5f\u4fc3\u8fdb\u4e86 Docker \u7e41\u8363\u3002\u53ef\u4ee5\u8bf4\u4e24\u8005\u76f8\u8f85\u76f8\u6210\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6709\u5173\u5fae\u670d\u52a1\u7684\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u79fb\u6b65\u81f3\u300a\u7b80\u8ff0 Microservices\uff08\u5fae\u670d\u52a1\uff09\u300b\u3002<\/span><\/section>\n<blockquote>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">http:\/\/www.importnew.com\/24651.html<\/span><\/section>\n<\/blockquote>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px; color: #20b2aa;\"><strong>\u4e3a\u4ec0\u4e48\u8981\u7528 Docker<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc; margin-left: 8px; margin-right: 8px;\">\n<li>\n<p style=\"text-align: justify;\"><span style=\"font-size: 15px;\">\u5f00\u53d1\u66f4\u52a0\u654f\u6377\uff1aDocker \u8ba9\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u81ea\u7531\u5b9a\u4e49\u73af\u5883\uff0c\u521b\u5efa\u548c\u90e8\u7f72\u7684\u5e94\u7528\u7a0b\u5e8f\u66f4\u5feb\u3001\u66f4\u5bb9\u6613\uff0cIT \u8fd0\u7ef4\u4eba\u5458\u5feb\u901f\u5e94\u5bf9\u53d8\u5316\u4e5f\u66f4\u52a0\u7075\u6d3b\u6027\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify;\"><span style=\"font-size: 15px;\">\u66f4\u52a0\u53ef\u63a7\uff1aDocker \u4f7f\u5f97\u5f00\u53d1\u4eba\u5458\u4fdd\u5b58\u4ece\u57fa\u7840\u8bbe\u65bd\u5230\u5e94\u7528\u7684\u4ee3\u7801\uff0c\u5e2e\u52a9 IT \u8fd0\u7ef4\u4eba\u7ba1\u7406\u62e5\u6709\u6807\u51c6\u7684\u3001\u5b89\u5168\u7684\u3001\u53ef\u6269\u5c55\u7684\u64cd\u4f5c\u73af\u5883\u3002<\/span><\/p>\n<\/li>\n<li>\n<p style=\"text-align: justify;\"><span style=\"font-size: 15px;\">\u9ad8\u53ef\u79fb\u690d\u6027\uff1aDocker \u5141\u8bb8\u81ea\u7531\u9009\u62e9\uff0c\u53ef\u4ee5\u662f\u4ece\u7b14\u8bb0\u672c\u7535\u8111\u5230\u4e00\u4e2a\u56e2\u961f\uff0c\u4ece\u79c1\u4eba\u57fa\u7840\u8bbe\u65bd\u5230\u516c\u5171\u4e91\u63d0\u4f9b\u5546\u3002<\/span><\/p>\n<\/li>\n<\/ul>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u8fd9\u6837\uff0c\u4f60\u53ef\u4ee5\u4e13\u6ce8\u4e8e\u5f00\u53d1\u5e94\u7528\uff0c\u5176\u4ed6\u7684\u7e41\u7410\u4e8b\u4ea4\u7ed9 Docker \u53bb\u505a\u5427\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 18px; color: #20b2aa;\"><strong>\u5982\u4f55\u4f7f\u7528 Docker<\/strong><\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u8fd9\u53ef\u771f\u662f\u4e00\u4e2a\u5927\u8bdd\u9898\uff0c\u5982\u679c\u5b8c\u6574\u9610\u8ff0\u8db3\u591f\u5199\u4e00\u672c\u4e66\u4e86\u3002\u597d\u5728\u6211\u4eec\u7684\u76ee\u7684\u662f\u505a\u5165\u95e8\u666e\u53ca\uff0c\u56e0\u6b64\u6211\u4eec\u5c31\u7b80\u5355\u8bb2\u4e00\u4e0b Docker \u7684\u5b89\u88c5\u3001\u57fa\u672c\u4f7f\u7528\u548c\u5e38\u7528\u547d\u4ee4\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<h2 style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px; color: #14c3a1;\"><strong>Docker\u5b89\u88c5<\/strong><\/span><\/h2>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u5efa\u8bae\u5728linux\u73af\u5883\u4e0b\u5b89\u88c5Docker\uff0cwindow\u73af\u5883\u642d\u5efa\u6bd4\u8f83\u590d\u6742\u4e14\u5bb9\u6613\u51fa\u9519\uff0c\u4f7f\u7528Centos7+yum\u6765\u5b89\u88c5Docker\u73af\u5883\u5f88\u65b9\u4fbf\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u8f6f\u4ef6\u5305\u5df2\u7ecf\u5305\u62ec\u5728\u9ed8\u8ba4\u7684 CentOS-Extras \u8f6f\u4ef6\u6e90\u91cc\u3002\u56e0\u6b64\u60f3\u8981\u5b89\u88c5 docker\uff0c\u53ea\u9700\u8981\u8fd0\u884c\u4e0b\u9762\u7684 yum \u547d\u4ee4\uff1a<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">yum <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 46px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">install<\/span> docker<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u542f\u52a8 docker \u670d\u52a1\uff0c\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3a\u5f00\u673a\u542f\u52a8\uff1a<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<blockquote>\n<section>\n<pre style=\"margin: 0; padding: 0; border-radius: none; background: none;\">\u00a0<\/pre>\n<\/section>\n<\/blockquote>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">service docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 33px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">start<\/span><br \/>chkconfig docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 13px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">on<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">LCTT \u8bd1\u6ce8\uff1a\u6b64\u5904\u91c7\u7528\u4e86\u65e7\u5f0f\u7684 sysv \u8bed\u6cd5\uff0c\u5982\u91c7\u7528CentOS 7\u4e2d\u652f\u6301\u7684\u65b0\u5f0f systemd \u8bed\u6cd5\uff0c\u5982\u4e0b\uff1a<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">service docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 33px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">start<\/span><br \/>chkconfig docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 13px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">on<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6d4b\u8bd5<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 46px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">version<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u8f93\u5165\u4e0a\u8ff0\u547d\u4ee4\uff0c\u8fd4\u56dedocker\u7684\u7248\u672c\u76f8\u5173\u4fe1\u606f\uff0c\u8bc1\u660edocker\u5b89\u88c5\u6210\u529f\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<h2 style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px; color: #14c3a1;\"><strong>Hello World<\/strong><\/span><\/h2>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u4e0b\u9762\uff0c\u6211\u4eec\u901a\u8fc7\u6700\u7b80\u5355\u7684 image \u6587\u4ef6&#8221;hello world&#8221;\uff0c\u611f\u53d7\u4e00\u4e0b Docker\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u56e0\u4e3a\u56fd\u5185\u8fde\u63a5 Docker \u7684\u5b98\u65b9\u4ed3\u5e93\u5f88\u6162\uff0c\u56e0\u6b64\u6211\u4eec\u5728\u65e5\u5e38\u4f7f\u7528\u4e2d\u4f1a\u4f7f\u7528Docker \u4e2d\u56fd\u52a0\u901f\u5668\u3002\u901a\u8fc7 Docker \u5b98\u65b9\u955c\u50cf\u52a0\u901f\uff0c\u4e2d\u56fd\u533a\u7528\u6237\u80fd\u591f\u5feb\u901f\u8bbf\u95ee\u6700\u6d41\u884c\u7684 Docker \u955c\u50cf\u3002\u8be5\u955c\u50cf\u6258\u7ba1\u4e8e\u4e2d\u56fd\u5927\u9646\uff0c\u672c\u5730\u7528\u6237\u73b0\u5728\u5c06\u4f1a\u4eab\u53d7\u5230\u66f4\u5feb\u7684\u4e0b\u8f7d\u901f\u5ea6\u548c\u66f4\u5f3a\u7684\u7a33\u5b9a\u6027\uff0c\u4ece\u800c\u80fd\u591f\u66f4\u654f\u6377\u5730\u5f00\u53d1\u548c\u4ea4\u4ed8 Docker \u5316\u5e94\u7528\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">Docker \u4e2d\u56fd\u5b98\u65b9\u955c\u50cf\u52a0\u901f\u53ef\u901a\u8fc7 registry.docker-cn.com\u8bbf\u95ee\u3002\u8be5\u955c\u50cf\u5e93\u53ea\u5305\u542b\u6d41\u884c\u7684\u516c\u6709\u955c\u50cf\uff0c\u79c1\u6709\u955c\u50cf\u4ecd\u9700\u8981\u4ece\u7f8e\u56fd\u955c\u50cf\u5e93\u4e2d\u62c9\u53d6\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u4fee\u6539\u7cfb\u7edf\u4e2ddocker\u5bf9\u5e94\u7684\u914d\u7f6e\u6587\u4ef6\u5373\u53ef\uff0c\u5982\u4e0b\uff1a<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">vi \/etc\/docker\/daemon.json<br \/><span style=\"color: #5c6370; background: rgba(0, 0, 0, 0); display: inline; width: 42px; text-decoration: none solid #5c6370; font-weight: 400; font-style: italic;\">#\u6dfb\u52a0\u540e<\/span><br \/>{<br \/><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 119px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">&#8220;registry-mirrors&#8221;<\/span>: [<span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 211px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">&#8220;https:\/\/registry.docker-cn.com&#8221;<\/span>],<br \/><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 93px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">&#8220;live-restore&#8221;<\/span>: <span style=\"color: #56b6c2; background: rgba(0, 0, 0, 0); display: inline; width: 26px; text-decoration: none solid #56b6c2; font-weight: 400; font-style: normal;\">true<\/span><br \/>}<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff0c\u5c06 image \u6587\u4ef6\u4ece\u4ed3\u5e93\u6293\u53d6\u5230\u672c\u5730\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\"><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 39px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">docker<\/span> pull library\/hello-world<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u4e0a\u9762\u4ee3\u7801\u4e2d\uff0cdocker image pull\u662f\u6293\u53d6 image \u6587\u4ef6\u7684\u547d\u4ee4\u3002library\/hello-world\u662f image \u6587\u4ef6\u5728\u4ed3\u5e93\u91cc\u9762\u7684\u4f4d\u7f6e\uff0c\u5176\u4e2dlibrary\u662f image \u6587\u4ef6\u6240\u5728\u7684\u7ec4\uff0chello-world\u662f image \u6587\u4ef6\u7684\u540d\u5b57\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6293\u53d6\u6210\u529f\u4ee5\u540e\uff0c\u5c31\u53ef\u4ee5\u5728\u672c\u673a\u770b\u5230\u8fd9\u4e2a image \u6587\u4ef6\u4e86\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker images<br \/><span style=\"color: #61aeee; background: rgba(0, 0, 0, 0); display: inline; width: 6px; text-decoration: none solid #61aeee; font-weight: 400; font-style: normal;\">#<\/span>\u663e\u793a\u7ed3\u679c<br \/>REPOSITORY TAG IMAGE ID CREATED SIZE<br \/>docker.io\/hello-world latest f2a91732366c 3 months ago 1.848 kB<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u73b0\u5728\uff0c\u8fd0\u884c\u8fd9\u4e2a image \u6587\u4ef6\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker run hello-world<br \/>#\u663e\u793a\u7ed3\u679c<br \/>Hello from Docker!<br \/>This message shows that your installation appears <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 13px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">to<\/span> <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 14px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">be<\/span> working correctly.<br \/>&#8230;<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u8f93\u51fa\u8fd9\u6bb5\u63d0\u793a\u4ee5\u540e\uff0chello world\u5c31\u4f1a\u505c\u6b62\u8fd0\u884c\uff0c\u5bb9\u5668\u81ea\u52a8\u7ec8\u6b62\u3002\u6709\u4e9b\u5bb9\u5668\u4e0d\u4f1a\u81ea\u52a8\u7ec8\u6b62\uff0c\u56e0\u4e3a\u63d0\u4f9b\u7684\u662f\u670d\u52a1\uff0c\u6bd4\u5982Mysql\u955c\u50cf\u7b49\u3002<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<h2 style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px; color: #14c3a1;\"><strong>\u5e38\u7528\u547d\u4ee4<\/strong><\/span><\/h2>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\"><strong>\u00a0<\/strong><\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u9664\u8fc7\u4ee5\u4e0a\u6211\u4eec\u4f7f\u7528\u7684Docker\u547d\u4ee4\u5916\uff0cDocker\u8fd8\u6709\u4e00\u4e9b\u5176\u5b83\u5e38\u7528\u7684\u547d\u4ee4\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u62c9\u53d6docker\u955c\u50cf<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\"><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 39px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">docker<\/span> pull image_name<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u67e5\u770b\u5bbf\u4e3b\u673a\u4e0a\u7684\u955c\u50cf\uff0cDocker\u955c\u50cf\u4fdd\u5b58\u5728\/var\/lib\/docker\u76ee\u5f55\u4e0b:<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\"><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 39px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">docker<\/span> images<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u5220\u9664\u955c\u50cf<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker rmi docker.io\/tomca<span style=\"color: #d19a66; background: rgba(0, 0, 0, 0); display: inline; width: 20px; text-decoration: none solid #d19a66; font-weight: 400; font-style: normal;\">t:7<\/span>.<span style=\"color: #d19a66; background: rgba(0, 0, 0, 0); display: inline; width: 26px; text-decoration: none solid #d19a66; font-weight: 400; font-style: normal;\">0.77<\/span>-jre7 \u6216\u8005 docker rmi b39c68b7af30<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u67e5\u770b\u5f53\u524d\u6709\u54ea\u4e9b\u5bb9\u5668\u6b63\u5728\u8fd0\u884c<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 13px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">ps<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u67e5\u770b\u6240\u6709\u5bb9\u5668<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 13px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">ps<\/span> &#8211;<span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 7px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">a<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u542f\u52a8\u3001\u505c\u6b62\u3001\u91cd\u542f\u5bb9\u5668\u547d\u4ee4\uff1a<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 33px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">start<\/span> container_name\/container_id<br \/>docker <span style=\"color: #c678dd; background: rgba(0, 0, 0, 0); display: inline; width: 26px; text-decoration: none solid #c678dd; font-weight: 400; font-style: normal;\">stop<\/span> container_name\/container_id<br \/>docker restart container_name\/container_id<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u540e\u53f0\u542f\u52a8\u4e00\u4e2a\u5bb9\u5668\u540e\uff0c\u5982\u679c\u60f3\u8fdb\u5165\u5230\u8fd9\u4e2a\u5bb9\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528attach\u547d\u4ee4\uff1a<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\"><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 39px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">docker<\/span> attach container_name\/container_id<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u5220\u9664\u5bb9\u5668\u7684\u547d\u4ee4<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\"><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 39px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">docker<\/span> rm container_name\/container_id<\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u67e5\u770b\u5f53\u524d\u7cfb\u7edfDocker\u4fe1\u606f<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\"><span style=\"color: #98c379; background: rgba(0, 0, 0, 0); display: inline; width: 39px; text-decoration: none solid #98c379; font-weight: 400; font-style: normal;\">docker<\/span> <span style=\"color: #56b6c2; background: rgba(0, 0, 0, 0); display: inline; width: 26px; text-decoration: none solid #56b6c2; font-weight: 400; font-style: normal;\">info<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u4eceDocker hub\u4e0a\u4e0b\u8f7d\u67d0\u4e2a\u955c\u50cf:<\/span><\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section>\n<section style=\"border-radius: 4px; font-size: 0.85em; margin: 0px 8px; background: #282c34; color: #abb2bf; display: block; padding: 6px; overflow-x: auto; white-space: nowrap;\">docker pull cento<span style=\"color: #d19a66; background: rgba(0, 0, 0, 0); display: inline; width: 53px; text-decoration: none solid #d19a66; font-weight: 400; font-style: normal;\">s:latest<\/span><br \/>docker pull cento<span style=\"color: #d19a66; background: rgba(0, 0, 0, 0); display: inline; width: 53px; text-decoration: none solid #d19a66; font-weight: 400; font-style: normal;\">s:latest<\/span><\/section>\n<\/section>\n<section style=\"margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u6267\u884cdocker pull centos\u4f1a\u5c06Centos\u8fd9\u4e2a\u4ed3\u5e93\u4e0b\u9762\u7684\u6240\u6709\u955c\u50cf\u4e0b\u8f7d\u5230\u672c\u5730repository\u3002<\/span><\/section>\n<section style=\"text-align: justify; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 15px;\">\u00a0<\/span><\/section>\n<section style=\"margin-right: 8px; margin-left: 8px; font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; white-space: normal; text-align: center; line-height: 1.75em;\"><\/section>\n<p style=\"padding-top: 8px; padding-bottom: 8px; white-space: normal; letter-spacing: 0.544px; color: #000000; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; font-size: 16px; background-color: #ffffff; line-height: 26px; text-align: center;\"><span style=\"color: #5e5e5e;\"><span style=\"font-weight: bolder;\"><span style=\"letter-spacing: 0px; font-size: 15px;\">&#8211; \u5b8c &#8211;<\/span><\/span><\/span><\/p>\n<p style=\"margin-right: 8px; margin-left: 8px; padding-right: 0.5em; padding-left: 0.5em; text-align: center; letter-spacing: 0.5px;\">\u00a0<\/p>\n<\/div>\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"947\" height=\"675\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/06\/\u5fae\u4fe1\u56fe\u7247_20200616164155.jpg\" alt=\"\" class=\"wp-image-29939\"\/><\/figure>\n\n\n\n<p>\u8f6c\u81ea\uff1ahttps:\/\/mp.weixin.qq.com\/s\/YqqbaywKpjq4cd3z5MiIww<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6765\u81ea\uff1a\u9a6c\u54e5Linux\u8fd0\u7ef4 \u00a0 Docker \u662f Golang \u7f16\u5199\u7684\uff0c \u81ea 2013 \u5e74\u63a8\u51fa\u4ee5\u6765\uff0c\u53d7\u5230\u8d8a\u6765\u8d8a\u591a &hellip; <a href=\"http:\/\/www.zhushiyao.com\/?p=29931\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u9ad8\u4e2d\u751f\u4e5f\u80fd\u8bfb\u61c2\u7684Docker\u5165\u95e8\u6559\u7a0b\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/29931"}],"collection":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29931"}],"version-history":[{"count":2,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/29931\/revisions"}],"predecessor-version":[{"id":29940,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/29931\/revisions\/29940"}],"wp:attachment":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29931"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}