{"id":519,"title":"docker\u5bb9\u5668\u4e2d\u5f00\u542fphp\u6269\u5c55,\u5236\u6210\u65b0\u955c\u50cf\u5e76\u63a8\u9001\u5230\u963f\u91cc\u4e91\u5bb9\u5668\u955c\u50cf\u670d\u52a1","good":8,"bad":10,"hit":2449,"created_at":"2021-02-20 14:50:58","content":"

\u573a\u666f\uff1a\u6bd4\u5982\u4f60\u81ea\u5df1\u5728\u7f51\u4e0a\u627e\u4e86\u4e00\u4e2a\u955c\u50cf\uff0c\u4f46\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u53d1\u73b0\u5c11\u4e86\u67d0\u4e2a\u6269\u5c55\uff0c\u4f60\u9700\u8981\u7528\u8fd9\u4e2a\u955c\u50cf\u542f\u52a8\u4e00\u4e2adocker\u5bb9\u5668\uff0c\u7136\u540e\u5728\u8fd9\u4e2a\u5bb9\u5668\u4e2d\u5b89\u88c5\u4f60\u9700\u8981\u7684\u6269\u5c55\uff0c\u5b89\u88c5\u5b8c\u540e\uff0c\u4f60\u5e0c\u671b\u5c06\u8fd9\u4e2a\u5bb9\u5668\u505a\u6210\u65b0\u955c\u50cf\u4fdd\u5b58\u8d77\u6765\uff0c\u7136\u540epush\u5230\u963f\u91cc\u4e91\u955c\u50cf\u670d\u52a1\uff08\u4e0b\u8f7d\u53ef\u4ee5\u52a0\u901f\uff09<\/span><\/p>

<\/span><\/p>

\u6bd4\u5982\u6211\u81ea\u5df1\u5728\u4f7f\u7528\u8fd9\u4e2a\u955c\u50cf\uff1aregistry.cn-shenzhen.aliyuncs.com\/yansongda\/skeleton:hyperf-7.4<\/span><\/span><\/p>

\u4f46\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u53d1\u73b0\u5c11\u4e86pcntl\u6269\u5c55\uff0c\u73b0\u5728\u9700\u8981\u5b89\u88c5\u8fd9\u4e2a\u6269\u5c55\uff0c\u5148\u7528\u8fd9\u4e2a\u955c\u50cf\u542f\u52a8\u4e00\u4e2adocker\u5bb9\u5668\u5e76\u767b\u5f55\u8fdb\u53bb\uff0c\u5e76\u5c06windows\u4e0b\u7684\u76ee\u5f55\u6302\u8f7d\u5230\u5bb9\u5668\u4e2d\u7684\/www\u76ee\u5f55\u4e0b\uff1a<\/span><\/span><\/p>

docker run -it -v D:\\hurong\\code\\php\\github_hyperf_stock:\/www --entrypoint bash registry.cn-shenzhen.aliyuncs.com\/yansongda\/skeleton:hyperf-7.4<\/span><\/p>

\u6210\u529f\u540e\u6211\u4eec\u5c31\u4f1a\u8fdb\u5230\u5bb9\u5668\u4e2d\u7684\/www\u76ee\u5f55\u4e0b\uff1a<\/span><\/p>

\u5148\u6267\u884c:<\/span><\/p>

apt-get updateapt-get install gcc\u518d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5pcntl\u6269\u5c55\uff1adocker-php-ext-install pcntl<\/strong><\/span><\/p>

\u7136\u540e\u9000\u51fa\u5bb9\u5668\uff0c\u7528docker ps -a\u67e5\u5230\u4f60\u521a\u624d\u7684\u5bb9\u5668id(CONTRAINER ID)\uff0c\u8fd9\u91cc\u5f97\u5230\u7684\u662f\uff1a7551c9b5d00f <\/span><\/span><\/p>

docker commit -a "hurong" -m "v1" 7551c9b5d00f <\/span>registry.cn-shanghai.aliyuncs.com\/hu-rong\/com:hyperf-7.4<\/span><\/span><\/strong><\/p>

\u767b\u5f55\u963f\u91cc\u4e91\u955c\u50cf\u670d\u52a1\uff08\u9700\u81ea\u5df1\u5230\u963f\u91cc\u4e91\u53bb\u5f00\u901a\uff09docker login --username=hurong24109 registry.cn-shanghai.aliyuncs.com\u8f93\u5165\u5bc6\u7801\u63d0\u793a\u767b\u5f55\u6210\u529f\u540e,\u5982\u679c\u6267\u884c\u4e86docker commit\u5c31\u4e0d\u7528\u6267\u884c\u4e0b\u9762\u8fd9\u884c\u547d\u4ee4\u4e86<\/strong>docker tag 7551c9b5d00f registry.cn-shanghai.aliyuncs.com\/hu-rong\/com:hyperf-7.4\u7136\u540e\u63a8\u9001\u5230\u963f\u91cc\u4e91\uff1adocker push registry.cn-shanghai.aliyuncs.com\/hurong\/com:hyperf-7.4\u6210\u529f\u540e\u5c31\u53ef\u4ee5\u5728\u963f\u91cc\u4e91\u4e2d\u770b\u5230\u4e86\uff1a<\/span><\/p>

\"image.png\"\/<\/span><\/p>

<\/span><\/p>

\u5982\u679c\u4f60\u4e0d\u60f3\u6216\u8005\u6ca1\u6709\u963f\u91cc\u4e91\u955c\u50cf\u52a0\u901f\uff0c\u53ea\u60f3\u5728\u672c\u5730\u4fdd\u5b58\uff0c\u8bf7\u53c2\u8003\uff1a<\/span><\/p>

http:\/\/www.hu-rong.com\/article\/521<\/a> <\/span><\/p>

\u7c7b\u4f3c\u4e8egit commit<\/p>

<\/p>

\u5982\u679cdocker-php-ext-install\u5b89\u88c5\u5931\u8d25\uff0c\u53c2\u8003\u5176\u5b83\u6269\u5c55\u5b89\u88c5\u65b9\u6cd5\uff1a<\/p>

http:\/\/www.hu-rong.com\/article\/525<\/a> <\/p>

<\/p>"}