{"id":218507,"date":"2021-05-25T08:45:28","date_gmt":"2021-05-25T00:45:28","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=218507"},"modified":"2021-05-13T09:47:13","modified_gmt":"2021-05-13T01:47:13","slug":"docker-linux","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/docker-linux.html","title":{"rendered":"Docker\u7684\u539f\u7406\u53ca\u7279\u6027\u4ecb\u7ecd"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u7531\u4e8e\u4f17\u591a\u65b0\u9896\u7684\u7279\u6027\u4ee5\u53ca\u9879\u76ee\u672c\u8eab\u7684\u5f00\u653e\u6027\uff0cDocker \u5728\u77ed\u65f6\u95f4\u5185\u83b7\u5f97\u8bf8\u591a\u5382\u5546\u7684\u9752\u7750\u3002Docker\u662f\u4e00\u6b3e\u6267\u884c\u64cd\u4f5c\u7cfb\u7edf\u7ea7\u865a\u62df\u5316\u7684\u514d\u8d39\u8f6f\u4ef6\uff0c\u88ab\u79f0\u4e3a\u5bb9\u5668\u7684\u8f6f\u4ef6\u5305\uff0c\u7528\u4e8e\u652f\u6301\u521b\u5efa\u548c\u4f7f\u7528 Linux\u5bb9\u5668\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u4ec0\u4e48\u662fDocker?<\/strong><\/div>\n

\u7531\u4e8e\u4f17\u591a\u65b0\u9896\u7684\u7279\u6027\u4ee5\u53ca\u9879\u76ee\u672c\u8eab\u7684\u5f00\u653e\u6027\uff0cDocker \u5728\u77ed\u65f6\u95f4\u5185\u83b7\u5f97\u8bf8\u591a\u5382\u5546\u7684\u9752\u7750\u3002Docker\u662f\u4e00\u6b3e\u6267\u884c\u64cd\u4f5c\u7cfb\u7edf\u7ea7\u865a\u62df\u5316\u7684\u514d\u8d39\u8f6f\u4ef6\uff0c\u88ab\u79f0\u4e3a\u5bb9\u5668\u7684\u8f6f\u4ef6\u5305\uff0c\u7528\u4e8e\u652f\u6301\u521b\u5efa\u548c\u4f7f\u7528 Linux\u5bb9\u5668\u3002<\/p>\n

\u4f7f\u7528Docker\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u5c01\u88c5\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\u610f\u7684 Linux \u673a\u5668\u4e0a\uff0c\u4e5f\u53ef\u4ee5\u5b9e\u73b0\u865a\u62df\u5316\u3002Docker \u5bb9\u5668\u5b8c\u5168\u4f7f\u7528\u6c99\u7bb1\u673a\u5236\uff0c\u76f8\u4e92\u4e4b\u95f4\u4e0d\u4f1a\u6709\u4efb\u4f55\u63a5\u53e3\uff0c\u8fd9\u4fdd\u8bc1\u4e86\u5bb9\u5668\u4e4b\u95f4\u7684\u5b89\u5168\u6027\u3002<\/p>\n

\"\"<\/p>\n

Docker\u539f\u7406\u662f\u4ec0\u4e48?<\/strong><\/div>\n

Docker \u6280\u672f\u4f7f\u7528\u2002Linux \u5185\u6838\u548c\u5185\u6838\u529f\u80fd\u6765\u5206\u9694\u8fdb\u7a0b\uff0c\u4ee5\u4fbf\u5404\u8fdb\u7a0b\u76f8\u4e92\u72ec\u7acb\u8fd0\u884c\u3002\u8fd9\u79cd\u72ec\u7acb\u6027\u6b63\u662f\u91c7\u7528\u5bb9\u5668\u7684\u76ee\u7684\u6240\u5728;\u5b83\u53ef\u4ee5\u72ec\u7acb\u8fd0\u884c\u591a\u79cd\u8fdb\u7a0b\u3001\u591a\u4e2a\u5e94\u7528\uff0c\u66f4\u52a0\u5145\u5206\u5730\u53d1\u6325\u57fa\u7840\u8bbe\u65bd\u7684\u4f5c\u7528\uff0c\u540c\u65f6\u4fdd\u6301\u5404\u4e2a\u72ec\u7acb\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u3002<\/p>\n

\u5bb9\u5668\u5de5\u5177(\u5305\u62ec Docker)\u53ef\u63d0\u4f9b\u57fa\u4e8e\u955c\u50cf\u7684\u90e8\u7f72\u6a21\u5f0f\u3002\u8fd9\u4f7f\u5f97\u5b83\u80fd\u591f\u8f7b\u677e\u8de8\u591a\u79cd\u73af\u5883\uff0c\u4e0e\u5176\u4f9d\u8d56\u7a0b\u5e8f\u5171\u4eab\u5e94\u7528\u6216\u670d\u52a1\u7ec4\u3002Docker \u8fd8\u53ef\u5728\u8fd9\u4e00\u5bb9\u5668\u73af\u5883\u4e2d\u81ea\u52a8\u90e8\u7f72\u5e94\u7528(\u6216\u8005\u5408\u5e76\u591a\u79cd\u6d41\u7a0b\uff0c\u4ee5\u6784\u5efa\u5355\u4e2a\u5e94\u7528)\u3002<\/p>\n

\u6b64\u5916\uff0c\u7531\u4e8e\u8fd9\u4e9b\u5de5\u5177\u57fa\u4e8e Linux \u5bb9\u5668\u6784\u5efa\uff0c\u4f7f\u5f97 Docker \u65e2\u6613\u4e8e\u4f7f\u7528\uff0c\u53c8\u522b\u5177\u4e00\u683c\u2014\u2014\u5b83\u53ef\u4e3a\u7528\u6237\u63d0\u4f9b\u524d\u6240\u672a\u6709\u7684\u9ad8\u5ea6\u5e94\u7528\u7a0b\u8bbf\u95ee\u6743\u9650\u3001\u5feb\u901f\u90e8\u7f72\u4ee5\u53ca\u7248\u672c\u63a7\u5236\u548c\u5206\u53d1\u80fd\u529b\u3002<\/p>\n

\"\"<\/p>\n

Docker\u5bb9\u5668\u7684\u597d\u5904<\/strong><\/div>\n
\u6a21\u5757\u5316<\/strong><\/span><\/div>\n

Docker \u5bb9\u5668\u5316\u65b9\u6cd5\u975e\u5e38\u6ce8\u91cd\u5728\u4e0d\u505c\u6b62\u6574\u4e2a\u5e94\u7528\u7684\u60c5\u51b5\u4e0b\uff0c\u5355\u72ec\u622a\u53d6\u90e8\u5206\u5e94\u7528\u8fdb\u884c\u66f4\u65b0\u6216\u4fee\u590d\u7684\u80fd\u529b\u3002\u9664\u4e86\u8fd9\u79cd\u57fa\u4e8e\u5fae\u670d\u52a1\u7684\u65b9\u6cd5\uff0c\u60a8\u8fd8\u53ef\u4ee5\u91c7\u7528\u4e0e\u9762\u5411\u670d\u52a1\u7684\u67b6\u6784(SOA)\u7c7b\u4f3c\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5728\u591a\u4e2a\u5e94\u7528\u95f4\u5171\u4eab\u8fdb\u7a0b\u3002<\/p>\n

\u5c42\u548c\u955c\u50cf\u7248\u672c\u63a7\u5236<\/strong><\/span><\/div>\n

\u6bcf\u4e2a Docker \u955c\u50cf\u6587\u4ef6\u90fd\u5305\u542b\u591a\u4e2a\u5c42\u3002\u8fd9\u4e9b\u5c42\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u6784\u6210\u5355\u4e2a\u955c\u50cf\u3002\u6bcf\u5f53\u955c\u50cf\u53d1\u751f\u6539\u53d8\u65f6\uff0c\u5c31\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u955c\u50cf\u5c42\u3002\u7528\u6237\u6bcf\u6b21\u53d1\u51fa\u547d\u4ee4(\u4f8b\u5982 run \u6216 copy)\u65f6\uff0c\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u955c\u50cf\u5c42\u3002<\/p>\n

Docker \u91cd\u590d\u4f7f\u7528\u8fd9\u4e9b\u5c42\u6765\u6784\u5efa\u65b0\u5bb9\u5668\uff0c\u501f\u6b64\u5e2e\u52a9\u52a0\u5feb\u6d41\u7a0b\u6784\u5efa\u3002\u955c\u50cf\u4e4b\u95f4\u4f1a\u5171\u4eab\u4e2d\u95f4\u53d8\u5316\uff0c\u4ece\u800c\u8fdb\u4e00\u6b65\u63d0\u5347\u901f\u5ea6\u3001\u89c4\u6a21\u4ee5\u53ca\u6548\u7387\u3002\u7248\u672c\u63a7\u5236\u662f\u955c\u50cf\u5c42\u672c\u8eab\u81ea\u5e26\u7684\u80fd\u529b\u3002\u6bcf\u6b21\u53d1\u751f\u65b0\u7684\u66f4\u6539\u65f6\uff0c\u60a8\u5927\u90fd\u4f1a\u83b7\u5f97\u4e00\u4e2a\u5185\u7f6e\u7684\u66f4\u6539\u65e5\u5fd7\uff0c\u5b9e\u73b0\u5bf9\u5bb9\u5668\u955c\u50cf\u7684\u5168\u76d8\u7ba1\u63a7\u3002<\/p>\n

\u56de\u6eda<\/strong><\/span><\/div>\n

\u56de\u6eda\u4e5f\u8bb8\u662f\u5c42\u6700\u503c\u5f97\u4e00\u63d0\u7684\u529f\u80fd\u3002\u6bcf\u4e2a\u955c\u50cf\u90fd\u62e5\u6709\u591a\u4e2a\u5c42\u3002\u4e3e\u4f8b\u800c\u8a00\uff0c\u5982\u679c\u60a8\u4e0d\u559c\u6b22\u8fed\u4ee3\u540e\u7684\u955c\u50cf\u7248\u672c\uff0c\u5b8c\u5168\u53ef\u4ee5\u901a\u8fc7\u56de\u6eda\uff0c\u8fd4\u56de\u4e4b\u524d\u7684\u7248\u672c\u3002\u8fd9\u4e00\u529f\u80fd\u8fd8\u652f\u6301\u654f\u6377\u5f00\u53d1\u65b9\u6cd5\uff0c\u5e2e\u52a9\u6301\u7eed\u5b9e\u65bd\u96c6\u6210\u548c\u90e8\u7f72(CI\/CD)\uff0c\u4f7f\u5176\u5728\u5de5\u5177\u5c42\u9762\u6210\u4e3a\u4e00\u79cd\u73b0\u5b9e\u3002<\/p>\n

\"\"<\/p>\n

\u5feb\u901f\u90e8\u7f72<\/strong><\/span><\/div>\n

\u542f\u52a8\u548c\u8fd0\u884c\u65b0\u786c\u4ef6\u3001\u5b9e\u65bd\u90e8\u7f72\u5e76\u6295\u5165\u4f7f\u7528\uff0c\u8fd9\u5728\u8fc7\u53bb\u4e00\u822c\u9700\u8981\u6570\u5929\u65f6\u95f4\u3002\u6295\u5165\u7684\u5fc3\u529b\u548c\u6210\u672c\u5f80\u5f80\u4e5f\u8ba9\u4eba\u4e0d\u582a\u91cd\u8d1f\u3002\u57fa\u4e8e Docker \u7684\u5bb9\u5668\u53ef\u5c06\u90e8\u7f72\u65f6\u95f4\u7f29\u77ed\u5230\u51e0\u79d2\u3002\u901a\u8fc7\u4e3a\u6bcf\u4e2a\u8fdb\u7a0b\u6784\u5efa\u5bb9\u5668\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u5c06\u8fd9\u4e9b\u7c7b\u4f3c\u8fdb\u7a0b\u5e94\u7528\u5230\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u800c\u4e14\uff0c\u7531\u4e8e\u65e0\u9700\u542f\u52a8\u64cd\u4f5c\u7cfb\u7edf\u5373\u53ef\u6dfb\u52a0\u6216\u79fb\u52a8\u5bb9\u5668\uff0c\u56e0\u6b64\u5927\u5e45\u7f29\u77ed\u4e86\u90e8\u7f72\u65f6\u95f4\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u5f97\u76ca\u4e8e\u8fd9\u79cd\u90e8\u7f72\u901f\u5ea6\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u65e0\u865e\u3001\u7ecf\u6d4e\u9ad8\u6548\u5730\u521b\u5efa\u548c\u9500\u6bc1\u5bb9\u5668\u521b\u5efa\u7684\u6570\u636e\u3002<\/p>\n

\u56e0\u6b64\uff0cDocker \u6280\u672f\u662f\u4e00\u79cd\u66f4\u52a0\u7cbe\u7ec6\u3001\u53ef\u63a7\u3001\u57fa\u4e8e\u5fae\u670d\u52a1\u7684\u6280\u672f\uff0c\u53ef\u4e3a\u4f01\u4e1a\u63d0\u4f9b\u66f4\u9ad8\u7684\u6548\u7387\u4ef7\u503c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u7531\u4e8e\u4f17\u591a\u65b0\u9896\u7684\u7279\u6027\u4ee5\u53ca\u9879\u76ee\u672c\u8eab\u7684\u5f00\u653e\u6027\uff0cDocker \u5728\u77ed\u65f6\u95f4\u5185\u83b7\u5f97\u8bf8\u591a\u5382\u5546\u7684\u9752\u7750\u3002Docker\u662f\u4e00\u6b3e\u6267\u884c\u64cd\u4f5c […]<\/p>\n","protected":false},"author":323,"featured_media":85146,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-218507","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\/218507","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\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=218507"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/218507\/revisions"}],"predecessor-version":[{"id":218514,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/218507\/revisions\/218514"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/85146"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=218507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=218507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=218507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}