{"id":1082,"date":"2021-09-07T23:40:30","date_gmt":"2021-09-07T15:40:30","guid":{"rendered":"http:\/\/www.tra56.com\/?p=1082"},"modified":"2021-09-07T23:40:30","modified_gmt":"2021-09-07T15:40:30","slug":"1082","status":"publish","type":"post","link":"https:\/\/www.tra56.com\/1082.html","title":{"rendered":"docker\u65b9\u5f0f\u5b89\u88c5hyperf"},"content":{"rendered":"

\u672c\u6587\u4ecb\u7ecd\u4e86\u501f\u52a9docker\u5b89\u88c5Hyperf\u6846\u67b6\u7684\u6d41\u7a0b\u53ca\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u3002<\/p>\n

Hypef\u4ecb\u7ecd<\/h1>\n

Hyperf \u662f\u57fa\u4e8e Swoole 4.5+<\/code> \u5b9e\u73b0\u7684\u9ad8\u6027\u80fd\u3001\u9ad8\u7075\u6d3b\u6027\u7684 PHP \u534f\u7a0b\u6846\u67b6\uff0c\u5185\u7f6e\u534f\u7a0b\u670d\u52a1\u5668\u53ca\u5927\u91cf\u5e38\u7528\u7684\u7ec4\u4ef6\uff0c\u6027\u80fd\u8f83\u4f20\u7edf\u57fa\u4e8e PHP-FPM<\/code> \u7684\u6846\u67b6\u6709\u8d28\u7684\u63d0\u5347\uff0c\u63d0\u4f9b\u8d85\u9ad8\u6027\u80fd\u7684\u540c\u65f6\uff0c\u4e5f\u4fdd\u6301\u7740\u6781\u5176\u7075\u6d3b\u7684\u53ef\u6269\u5c55\u6027\uff0c\u6807\u51c6\u7ec4\u4ef6\u5747\u57fa\u4e8e PSR \u6807\u51c6<\/a> \u5b9e\u73b0\uff0c\u57fa\u4e8e\u5f3a\u5927\u7684\u4f9d\u8d56\u6ce8\u5165\u8bbe\u8ba1\uff0c\u4fdd\u8bc1\u4e86\u7edd\u5927\u90e8\u5206\u7ec4\u4ef6\u6216\u7c7b\u90fd\u662f \u53ef\u66ff\u6362<\/code> \u4e0e \u53ef\u590d\u7528<\/code> \u7684\u3002<\/p>\n

\u5b98\u7f51<\/h1>\n

https:\/\/hyperf.wiki<\/a><\/p>\n

\u5b89\u88c5<\/h1>\n

\u5b98\u7f51\u624b\u518c\u63d0\u4f9b\u4e862.0 \u7248\u672c\u7684\u4e24\u79cd\u5b89\u88c5\u65b9\u5f0f \u73af\u5883ok+composer \u548c docker+composer\u3002 \u5730\u5740\uff1ahttps:\/\/hyperf.wiki\/2.0\/#\/zh-cn\/quick-start\/install<\/a><\/p>\n

\u9274\u4e8edocker\u63d0\u4f9b\u7684\u4fbf\u6377\u6027\uff0c\u6211\u662f\u7528docker+composer\u65b9\u5f0f\u5b89\u88c5\u3002\u547d\u4ee4\u4e2d\/demo\/skeleton\u8def\u5f84\u9700\u8981\u4fee\u6539\u4e3a\u4f60\u60f3\u5b58\u50a8\u6846\u67b6\u4ee3\u7801\u7684\u6587\u4ef6\u8def\u5f84\u3002\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n

\n\n
\n
\n
1<\/div>\n<\/td>\n
\n
docker run -<\/code>v<\/code> \/demo\/skeleton<\/code>:<\/code>\/hyperf-skeleton<\/code> -p 9501:9501 -it --entrypoint <\/code>\/bin\/sh<\/code> hyperf<\/code>\/hyperf<\/code>:latest<\/code><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

 <\/p>\n

\u672c\u5730\u6ca1\u6709Hyperf\u955c\u50cf\u4f1a\u5230\u955c\u50cf\u4ed3\u5e93\u62c9\u53d6\uff0c\u8fd9\u91cc\u53ef\u80fd\u4f1a\u51fa\u73b0\u62c9\u53d6\u666f\u8c61\u5361\u4f4f\u95ee\u9898\uff0c\u53ef\u80fd\u56e0\u4e3a\u56fd\u5185\u8bbf\u95eedockerhub\u6bd4\u8f83\u6162\uff0c\u5efa\u8bae\u6539\u6210\u56fd\u5185\u7684\u955c\u50cf\u4ed3\u5e93\uff0c\u963f\u91cc\u4e91\u6216\u8005\u7f51\u6613\u7684\u3002<\/p>\n

\"\"<\/p>\n

\u4ee5\u4e0a\u547d\u4ee4\u4f1a\u5728\u955c\u50cf\u62c9\u53d6\u6210\u529f\u540e\u8fdb\u5165\u5bb9\u5668\u5185\uff0c\u6240\u4ee5\u6211\u4eec\u5728\u5bb9\u5668\u5185\u5b89\u88c5composer\u3002<\/p>\n

\n\n
\n
\n
1<\/div>\n<\/td>\n
\n
wget https:<\/code>\/\/github<\/code>.com<\/code>\/composer\/composer\/releases\/download\/1<\/code>.8.6<\/code>\/composer<\/code>.phar<\/code><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

 <\/p>\n

\u4e0b\u8f7d\u6210\u529f\u3002<\/p>\n

\"\"<\/p>\n

 <\/p>\n

\u4fee\u6539\u6587\u4ef6\u6743\u9650\uff0c\u4fee\u6539composer\u4ed3\u5e93\u5730\u5740\uff0c\u521b\u5efahyperf\u9879\u76ee\u3002\u521b\u5efa\u547d\u4ee4\u6267\u884c\u65f6\uff0c\u4f1a\u63d0\u793a\u4e0d\u53ef\u7528root\u8d26\u53f7\u8fd0\u884ccomposer\u547d\u4ee4\uff0c\u6211\u4eec\u6d4b\u8bd5\u65f6\u53ef\u4ee5\u5ffd\u7565\uff0c\u4e0d\u5f71\u54cd\u6267\u884c\u6d41\u7a0b\uff0c\u4f46\u662f\u4e0a\u7ebf\u52a1\u5fc5\u5355\u72ec\u8bbe\u7f6e\u8d26\u53f7\u3002<\/p>\n

\"\"<\/p>\n

 <\/p>\n

\u5728hyperf\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u8bbe\u7f6e\u90a3\u4e9b\u7ec4\u4ef6\u9700\u8981\u5b89\u88c5\uff0c\u8fd8\u6709\u4e00\u4e9b\u57fa\u7840\u914d\u7f6e\u9879\uff0c\u5728\u7ec8\u7aef\u6309\u7167\u63d0\u793a\u8f93\u5165 1 2 3 \u6216\u8005n\u3002<\/p>\n

\"\"<\/p>\n

\u5b89\u88c5\u5b8c\u6210\u3002<\/p>\n

\"\"<\/p>\n

\u542f\u52a8hyperf\u3002<\/p>\n

\"\"<\/p>\n

\u7ec8\u7aef\u663e\u793a\u5982\u4e0b\u4fe1\u606f\u8bf4\u660e\u542f\u52a8\u6210\u529f\u3002<\/p>\n

\u5b89\u88c5\u8fc7\u7a0b\u5927\u698220\u5206\u949f\u3002<\/p>\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

\u672c\u6587\u4ecb\u7ecd\u4e86\u501f\u52a9docker\u5b89\u88c5Hyperf\u6846\u67b6\u7684\u6d41\u7a0b\u53ca\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u3002 Hypef\u4ecb\u7ecd Hyperf \u662f\u57fa\u4e8e& […]<\/p>\n","protected":false},"author":1,"featured_media":1083,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[91],"tags":[],"class_list":["post-1082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hyperf"],"_links":{"self":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/1082"}],"collection":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/comments?post=1082"}],"version-history":[{"count":1,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/1082\/revisions"}],"predecessor-version":[{"id":1089,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/1082\/revisions\/1089"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/media\/1083"}],"wp:attachment":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/media?parent=1082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/categories?post=1082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/tags?post=1082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}