{"id":5653,"date":"2023-11-02T17:58:30","date_gmt":"2023-11-02T09:58:30","guid":{"rendered":"http:\/\/n.ht\/wordpress\/?p=1"},"modified":"2023-11-02T17:58:30","modified_gmt":"2023-11-02T09:58:30","slug":"hello-world-2-2","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=5653","title":{"rendered":"\u5b9d\u5854\u9762\u677fdocker\u7528\u6cd5"},"content":{"rendered":"\n<h3>\u5b9d\u5854\u9762\u677fDocker\u7528\u6cd5\u8be6\u89e3<\/h3>\n<p>Docker\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u5bb9\u5668\u6280\u672f\uff0c\u5e7f\u6cdb\u7528\u4e8e\u5f00\u53d1\u3001\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002\u5b9d\u5854\u9762\u677f\uff08BT\u9762\u677f\uff09\u96c6\u6210\u4e86Docker\u7ba1\u7406\u63d2\u4ef6\uff0c\u4f7f\u5f97\u5728\u670d\u52a1\u5668\u4e0a\u4f7f\u7528Docker\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u76f4\u89c2\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u7ba1\u7406Docker\u5bb9\u5668\uff0c\u4ee5\u53caDocker\u7684\u5e38\u89c1\u7528\u6cd5\u3002<\/p>\n<h3>\u4e00\u3001\u5b89\u88c5Docker\u7ba1\u7406\u63d2\u4ef6<\/h3>\n<h3>1. \u786e\u8ba4\u670d\u52a1\u5668\u73af\u5883<\/h3>\n<p>\u5728\u4f7f\u7528Docker\u4e4b\u524d\uff0c\u786e\u4fdd\u60a8\u7684\u670d\u52a1\u5668\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\uff1a<\/p>\n<ul class=\"list-paddingleft-2\">\n<li>\n<p><strong>\u64cd\u4f5c\u7cfb\u7edf<\/strong>\uff1aCentOS 7+\u3001Ubuntu 20.04+\u6216Debian\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5185\u5b58<\/strong>\uff1a\u81f3\u5c112GB\uff08\u63a8\u83504GB\u6216\u4ee5\u4e0a\uff09\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>2. \u5b89\u88c5Docker\u7ba1\u7406\u63d2\u4ef6<\/h3>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p>\u767b\u5f55\u5b9d\u5854\u9762\u677f\uff0c\u8fdb\u5165\u201c\u8f6f\u4ef6\u5546\u5e97\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u201c\u672a\u5b89\u88c5\u201d\u5217\u8868\u4e2d\u627e\u5230\u201cDocker\u7ba1\u7406\u5668\u201d\uff0c\u70b9\u51fb\u201c\u5b89\u88c5\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u5c06\u5728\u5de6\u4fa7\u83dc\u5355\u4e2d\u770b\u5230\u201cDocker\u7ba1\u7406\u201d\u9009\u9879\u3002<\/p>\n<\/li>\n<\/ol>\n<h3>\u4e8c\u3001Docker\u57fa\u672c\u64cd\u4f5c<\/h3>\n<h3>1. \u62c9\u53d6\u955c\u50cf<\/h3>\n<p>\u955c\u50cf\u662fDocker\u5bb9\u5668\u7684\u57fa\u7840\uff0c\u901a\u8fc7\u955c\u50cf\u53ef\u4ee5\u521b\u5efa\u548c\u8fd0\u884c\u5bb9\u5668\u3002\u5728\u5b9d\u5854\u9762\u677f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u62c9\u53d6\u5b98\u65b9\u6216\u7b2c\u4e09\u65b9\u955c\u50cf\u3002<\/p>\n<p><strong>\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p>\u6253\u5f00\u201cDocker\u7ba1\u7406\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u201c\u955c\u50cf\u7ba1\u7406\u201d\uff0c\u9009\u62e9\u201c\u62c9\u53d6\u955c\u50cf\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\u8f93\u5165\u955c\u50cf\u540d\u79f0\uff0c\u4f8b\u5982<code>nginx<\/code>\uff0c\u70b9\u51fb\u201c\u62c9\u53d6\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u62c9\u53d6\u6210\u529f\u540e\uff0c\u955c\u50cf\u4f1a\u663e\u793a\u5728\u955c\u50cf\u5217\u8868\u4e2d\u3002<\/p>\n<\/li>\n<\/ol>\n<h3>2. \u521b\u5efa\u5e76\u8fd0\u884c\u5bb9\u5668<\/h3>\n<p>\u955c\u50cf\u62c9\u53d6\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u57fa\u4e8e\u8be5\u955c\u50cf\u521b\u5efa\u5bb9\u5668\u5e76\u8fd0\u884c\u3002<\/p>\n<p><strong>\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol class=\"list-paddingleft-2\">\n<li>\n<p>\u5728\u201cDocker\u7ba1\u7406\u201d\u4e2d\uff0c\u70b9\u51fb\u201c\u5bb9\u5668\u7ba1\u7406\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>\u70b9\u51fb\u201c\u521b\u5efa\u5bb9\u5668\u201d\uff0c\u9009\u62e9\u8981\u4f7f\u7528\u7684\u955c\u50cf\u3002<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u5bb9\u5668\u7684\u57fa\u672c\u4fe1\u606f\uff1a<\/p>\n<\/li>\n<\/ol>\n<ul class=\"list-paddingleft-2\">\n<li>\n<p><strong>\u5bb9\u5668\u540d\u79f0<\/strong>\uff1a\u81ea\u5b9a\u4e49\u5bb9\u5668\u7684\u540d\u79f0\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7aef\u53e3\u6620\u5c04<\/strong>\uff1a\u8bbe\u7f6e\u5bb9\u5668\u5185\u90e8\u7aef\u53e3\u4e0e\u5916\u90e8\u7aef\u53e3\u7684\u6620\u5c04\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5377\u6302\u8f7d<\/strong>\uff1a\u5c06\u670d\u52a1\u5668\u7684\u76ee\u5f55\u4e0e\u5bb9\u5668\u5185\u90e8\u76ee\u5f55\u7ed1\u5b9a\uff0c\u5b9e\u73b0\u6570\u636e\u6301\u4e45\u5316\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u73af\u5883\u53d8\u91cf<\/strong>\uff1a\u8bbe\u7f6e\u5bb9\u5668\u6240\u9700\u7684\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u201c\u521b\u5efa\u5e76\u542f\u52a8\u201d\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>3. \u7ba1\u7406\u5bb9\u5668<\/h3>\n<p>\u5bb9\u5668\u521b\u5efa\u5e76\u8fd0\u884c\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u5bf9\u5176\u8fdb\u884c\u7ba1\u7406\u3002<\/p>\n<p><strong>\u5e38\u89c1\u64cd\u4f5c\uff1a<\/strong><\/p>\n<ul class=\"list-paddingleft-2\">\n<li>\n<p><strong>\u542f\u52a8\/\u505c\u6b62\u5bb9\u5668<\/strong>\uff1a\u5728\u201c\u5bb9\u5668\u7ba1\u7406\u201d\u4e2d\uff0c\u9009\u62e9\u5bb9\u5668\u540e\u70b9\u51fb\u201c\u542f\u52a8\u201d\u6216\u201c\u505c\u6b62\u201d\u6309\u94ae\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u65e5\u5fd7<\/strong>\uff1a\u70b9\u51fb\u5bb9\u5668\u53f3\u4fa7\u7684\u201c\u65e5\u5fd7\u201d\u6309\u94ae\uff0c\u67e5\u770b\u5bb9\u5668\u7684\u8fd0\u884c\u65e5\u5fd7\uff0c\u5e2e\u52a9\u6392\u67e5\u95ee\u9898\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u8fdb\u5165\u5bb9\u5668<\/strong>\uff1a\u70b9\u51fb\u201c\u7ec8\u7aef\u201d\u6309\u94ae\uff0c\u8fdb\u5165\u5bb9\u5668\u5185\u90e8\u6267\u884c\u547d\u4ee4\uff0c\u7c7b\u4f3c\u4e8e\u5728\u670d\u52a1\u5668\u4e0a\u64cd\u4f5c\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u4e09\u3001\u4f7f\u7528Docker Compose<\/h3>\n<p>Docker Compose\u662f\u4e00\u79cd\u5b9a\u4e49\u548c\u8fd0\u884c\u591a\u5bb9\u5668Docker\u5e94\u7528\u7684\u5de5\u5177\u3002\u5728\u5b9d\u5854\u9762\u677f\u4e2d\uff0c\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528Docker Compose\u6765\u7ba1\u7406\u590d\u6742\u7684\u591a\u5bb9\u5668\u5e94\u7528\u3002<\/p>\n<h3>1. \u521b\u5efaDocker Compose\u6587\u4ef6<\/h3>\n<p>Docker Compose\u901a\u8fc7<code>docker-compose.yml<\/code>\u6587\u4ef6\u5b9a\u4e49\u670d\u52a1\u3001\u7f51\u7edc\u548c\u5377\u3002\u5728\u5b9d\u5854\u9762\u677f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u521b\u5efa\u548c\u7f16\u8f91\u8fd9\u4e2a\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9d\u5854\u9762\u677fDocker\u7528\u6cd5\u8be6\u89e3 Docker\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u5bb9\u5668\u6280\u672f\uff0c\u5e7f\u6cdb\u7528\u4e8e\u5f00\u53d1\u3001\u90e8\u7f72\u548c\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\u3002\u5b9d\u5854\u9762\u677f\uff08BT\u9762\u677f\uff09\u96c6\u6210\u4e86Docker\u7ba1\u7406\u63d2\u4ef6\uff0c\u4f7f\u5f97\u5728\u670d\u52a1\u5668\u4e0a\u4f7f\u7528Docker\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u76f4\u89c2\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u5b9d\u5854\u9762\u677f\u7ba1\u7406Docke&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[128],"tags":[159,220],"topic":[],"class_list":["post-5653","post","type-post","status-publish","format-standard","hentry","category-128","tag-docker","tag-220"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/5653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5653"}],"version-history":[{"count":0,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/5653\/revisions"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5653"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5653"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=5653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}