{"id":1829,"date":"2021-02-09T12:45:39","date_gmt":"2021-02-09T04:45:39","guid":{"rendered":"http:\/\/123.57.164.21\/?p=1829"},"modified":"2021-02-09T12:45:39","modified_gmt":"2021-02-09T04:45:39","slug":"%e6%b5%85%e5%85%a5%e6%b5%85%e5%87%ba%e5%ae%b9%e5%99%a8%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=1829","title":{"rendered":"\u6d45\u5165\u6d45\u51fa\u5bb9\u5668\u6587\u4ef6\u7cfb\u7edf"},"content":{"rendered":"\n<p>\u300c\u5c42\u300d\u8fd9\u4e2a\u6982\u5ff5\u5728\u8f6f\u4ef6\u9886\u57df\u975e\u5e38\u5e38\u89c1\u3002\u901a\u8fc7\u300c\u5206\u5c42\u300d\uff0c\u53ef\u4ee5\u628a\u4e0d\u540c\u9886\u57df\u7684\u95ee\u9898\u9694\u79bb\u5f00\uff0c\u5355\u72ec\u89e3\u51b3\u3002\u67b6\u6784\u4e0a\u6709MVC\uff0c\u5373\u6a21\u578b\u3001\u89c6\u56fe\u3001\u63a7\u5236\u5668\uff1b\u8fd0\u884c\u73af\u5883\u4e0a\uff0c\u53ef\u4ee5\u5206\u4e3aCPU\uff0f\u64cd\u4f5c\u7cfb\u7edf\uff0f\u8fd0\u884c\u65f6\uff1b\u7f16\u5199\u4ee3\u7801\u65f6\uff0c\u53ef\u4ee5\u5206\u4e3a\u65b9\u6cd5\uff0f\u7c7b\uff0f\u5305\u7b49\u7b49\u3002 \u5bb9\u5668\u6280\u672f\u672c\u8d28\u4e0a\u4e5f\u662f\u521b\u9020\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e0a\u7684\u300c\u5c42\u300d\uff0c\u5b83\u9694\u79bb\u5f00\u5176\u5185\u90e8\u7684\u7a0b\u5e8f\u548c\u5916\u90e8\u7684\u5bbf\u4e3b\uff0c\u4fdd\u8bc1\u53cc\u65b9\u6700\u5927\u9650\u5ea6\u7684\u89e3\u8026\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u5185\u6838\u7a7a\u95f4\u548c\u7528\u6237\u7a7a\u95f4<\/h5>\n\n\n\n<p>\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u4ee5Linux\u4e3a\u4f8b\uff0c\u5b8f\u89c2\u4e0a\u5b58\u5728\u4e24\u5c42\u2014\u2014\u5185\u6838\u5c42\u548c\u7528\u6237\u5c42\u3002\u5185\u6838\u5c42\u4e3b\u8981\u8d1f\u8d23\u4e00\u4e9b\u7cfb\u7edf\u7ea7\u64cd\u4f5c\uff0c\u5185\u5b58\u7ba1\u7406\u3001IO\u64cd\u4f5c\u3001\u8fdb\u7a0b\u7ba1\u7406\u3001\u6587\u4ef6\u7cfb\u7edf\u7b49\u7b49\u3002\u7528\u6237\u5c42\u533a\u522b\u4e8e\u5185\u6838\u5c42\uff0c\u53ea\u80fd\u901a\u8fc7\u53eb\u505a\u300c\u7cfb\u7edf\u8c03\u7528\u300d\u7684\u65b9\u5f0f\u4e0e\u5185\u6838\u5c42\u4ea4\u4e92\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/02\/image-124.png\" alt=\"\" class=\"wp-image-1831\" width=\"433\" height=\"246\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124.png 840w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124-300x171.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124-768x437.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124-830x472.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124-230x131.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124-350x199.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-124-480x273.png 480w\" sizes=\"(max-width: 433px) 100vw, 433px\" \/><\/figure><\/div>\n\n\n\n<p>\u5728Linux\u7684\u65e0\u6570\u53d1\u884c\u7248\u672c\u4e2d\uff08Ubuntu\/CentOS\/Fedora\/\u2026\uff09\uff0c\u5185\u6838\u5c42\u90fd\u6765\u81ea\u4e8e\u4e00\u5957\u5185\u6838\u4ee3\u7801\u3002\u4f46\u662f\u5728\u7528\u6237\u5c42\uff0c\u6bcf\u4e2a\u53d1\u884c\u7248\u90fd\u6253\u5305\u4e86\u5404\u81ea\u4e00\u5957\u8f6f\u4ef6\u5e93\u3002\u5c3d\u7ba1\u6bcf\u4e2a\u53d1\u884c\u7248\u53ef\u4ee5\u81ea\u5b9a\u4e49\uff0c\u7f16\u8bd1\u51fa\u4e0d\u540c\u7684\u5185\u6838\uff0c\u4f46\u548c\u5185\u6838\u901a\u8baf\u7684\u300c\u7cfb\u7edf\u8c03\u7528\u300d\u5728\u4e0d\u540c\u53d1\u884c\u7248\u4e2d\u5374\u76f8\u5dee\u65e0\u51e0\u3002\u8fd9\u4fdd\u8bc1\u4e86Linux\u4e0a\u7684\u7a0b\u5e8f\u53ef\u4ee5\u517c\u5bb9\u4e0d\u540c\u7684\u53d1\u884c\u7248\u3002\uff08\u540c\u4e00\u5bb9\u5668\u4e5f\u56e0\u6b64\u517c\u5bb9\u4e0d\u540c\u7684\u5bbf\u4e3b\uff09\u3002<\/p>\n\n\n\n<p>\u4e00\u4e2a\u7a0b\u5e8f\u8fd0\u884c\u5728\u4e00\u4e2aLinux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u65f6\uff0c\u4e00\u90e8\u5206\u4f1a\u4f9d\u8d56\u4e8e\u7cfb\u7edf\u8c03\u7528\uff0c\u5b8c\u6210\u4e00\u4e9b\u5185\u6838\u7ea7\u522b\u7684\u64cd\u4f5c\uff1b\u53e6\u4e00\u90e8\u5206\u4f1a\u4f9d\u8d56\u7528\u6237\u5c42\u7684\u8f6f\u4ef6\u5e93\uff0c\u4f46\u8fd9\u4e9b\u4f9d\u8d56\u5e93\uff0c\u6700\u7ec8\u53c8\u8ffd\u6eaf\u5230\u4e0d\u540c\u7684\u7cfb\u7edf\u8c03\u7528\u3002\u6240\u4ee5\u5728\u4e00\u4e2a\u7a0b\u5e8f\u8fd0\u884c\u65f6\uff0c\u300c\u7a0b\u5e8f\uff0f\u4f9d\u8d56\u5e93\uff0f\u5185\u6838\u300d\u4e09\u5c42\u53c8\u53ef\u4ee5\u5f52\u4e3a\u300c\u7a0b\u5e8f\uff0f\u5185\u6838\u300d\u4e24\u5c42\u3002<\/p>\n\n\n\n<p>\u4ece\u6587\u4ef6\u7cfb\u7edf\u7684\u7ef4\u5ea6\u6765\u770b\uff0c\u7a0b\u5e8f\u672c\u8eab\u5c31\u662f\u6587\u4ef6\u3002\u8981\u4e48\u662f\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u8981\u4e48\u662f\u53ef\u89e3\u91ca\u4ee3\u7801\u6587\u4ef6\u3002\u5728\u521b\u5efa\u5bb9\u5668\u65f6\uff0c\u5185\u6838\u662f\u5171\u4eab\u7684\uff0c\u6240\u4ee5\u53ea\u9700\u8981\u628a\u7a0b\u5e8f\u6587\u4ef6\u62f7\u8d1d\u5230\u5bb9\u5668\u91cc\uff0c\u7136\u540e\u5728\u5bb9\u5668\u91cc\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n\n\n\n<p>Docker\u7528\u955c\u50cf\uff08image\uff09\u6765\u7ba1\u7406\u6587\u4ef6\uff0c\u4e00\u4e2a\u955c\u50cf\u4e2d\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u548c\u5176\u4f9d\u8d56\u7684\u7a0b\u5e8f\u5e93\u3002\u5bb9\u5668\u542f\u52a8\u540e\uff0c\u4f1a\u81ea\u52a8\u300c\u62f7\u8d1d\u300d\u955c\u50cf\u4e2d\u7684\u6587\u4ef6\u5230\u5bb9\u5668\u300c\u672c\u5730\u300d\uff0c\u7136\u540e\u8fd0\u884c\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">UnionFS\u548cDocker\u955c\u50cf<\/h5>\n\n\n\n<p>Linux\u4e2d\u7684\u6587\u4ef6\u7cfb\u7edf\u6709\u4e9b\u529f\u80fd\u8bbe\u8ba1\u7684\u5f88\u5de7\u5999\uff0c\u6bd4\u5982\u6302\u8f7d(mount)\uff0c\u5141\u8bb8\u628a\u4e00\u4e2a\u5916\u90e8\u7684\u6587\u4ef6\u7cfb\u7edf\uff08\u5982CD\uff0cUSB\uff09\u4ee5\u672c\u5730\u8def\u5f84\u7684\u5f62\u5f0f\u53bb\u8bbf\u95ee\u3002\u4f8b\u5982\u653e\u7f6e\u4e00\u5f20CD\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee<code>\/mnt\/cdrom<\/code>\u6765\u67e5\u770bCD\u4e2d\u7684\u5185\u5bb9\u3002<\/p>\n\n\n\n<p>Union File System\uff08UnionFS\uff09\u5219\u8bbe\u8ba1\u7684\u66f4\u52a0\u5de7\u5999\u3002\u5728\u300c\u6302\u8f7d\u300d\u529f\u80fd\u7684\u57fa\u7840\u4e0a\uff0cUnionFS\u5141\u8bb8\u5728\u672c\u5730\u8def\u5f84\u6302\u8f7d\u591a\u4e2a\u76ee\u6807\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u6211\u6709\u4e24\u4e2a\u6587\u4ef6\u5939a, b\uff0c\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/02\/image-125-1024x337.png\" alt=\"\" class=\"wp-image-1832\" width=\"419\" height=\"137\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-1024x337.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-300x99.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-768x253.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-830x273.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-230x76.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-350x115.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125-480x158.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-125.png 1208w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\"><br><\/h5>\n\n\n\n<p>UnionFS\u5141\u8bb8\u628a\u5b83\u4eec\u4e00\u8d77\u6302\u8f7d\u5230\u540c\u4e00\u4e2a\u672c\u5730\u8def\u5f84<code>\/mnt\/unions<\/code>\uff0c\u5176\u6700\u7ec8\u7ed3\u6784\u53d8\u4e3a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/02\/image-126.png\" alt=\"\" class=\"wp-image-1833\" width=\"429\" height=\"93\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-126.png 918w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-126-300x66.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-126-768x169.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-126-230x51.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-126-350x77.png 350w\" sizes=\"(max-width: 429px) 100vw, 429px\" \/><\/figure><\/div>\n\n\n\n<p>\u5728\u6302\u8f7d\u65f6\uff0c\u6211\u53ef\u4ee5\u9009\u62e9\u65b0\u6587\u4ef6\u548c\u65b0\u589e\u7684\u4fee\u6539\u5199\u5165\u5230\u54ea\u4e00\u4e2a\u76ee\u6807\u76ee\u5f55\u3002\u5982\u679c\u628a\u4fee\u6539\u5199\u5165\u4e0d\u540c\u4e8e\u6e90\u7684\u76ee\u6807\u8def\u5f84\uff0cUnionFS\u652f\u6301\u589e\u91cf\u5b58\u50a8\uff0c\u9ad8\u6548\u5229\u7528\u5b58\u50a8\u7a7a\u95f4\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/02\/image-127-1024x382.png\" alt=\"\" class=\"wp-image-1836\" width=\"470\" height=\"175\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-1024x382.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-300x112.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-768x286.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-830x309.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-230x86.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-350x130.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127-480x179.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-127.png 1390w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">Docker\u4e2d\u7684\u300c\u5c42\u300d<\/h5>\n\n\n\n<p>UnionFS\u5728Docker\u4e2d\u7684\u53e6\u4e00\u4e2a\u5e94\u7528\uff0c\u8fd8\u4f53\u73b0\u5728\u955c\u50cf\u672c\u8eab\u4e0a\u3002<\/p>\n\n\n\n<p>\u5bb9\u5668\u8fd0\u884c\u65f6\uff0c\u5728\u6302\u8f7d\u7684\u4e34\u65f6\u76ee\u5f55\u4e2d\u5982\u679c\u5199\u5165\u6570\u636e\uff0c\u8fd8\u53ef\u4ee5\u9009\u62e9\u628a\u8fd9\u90e8\u5206\u6570\u636e\u4ece\u4e34\u65f6\u76ee\u5f55\u4e2d\u4fdd\u5b58\u4e0b\u6765\uff0c\u8fd9\u6837\u5c31\u751f\u6210\u4e86\u4e00\u4e2a\u65b0\u7684\u955c\u50cf\u3002Docker\u5728\u4fdd\u5b58\u65b0\u955c\u50cf\u65f6\uff0c\u4f1a\u628a\u5b83\u4eec\u4e24\u90e8\u5206\u2014\u2014\u539f\u955c\u50cf\u548c\u589e\u91cf\u2014\u2014\u90fd\u4fdd\u5b58\u5728\u65b0\u955c\u50cf\u4e2d\u3002\u5176\u4e2d\u65b0\u7684\u589e\u91cf\u90e8\u5206\uff0c\u5c31\u88ab\u79f0\u4e3a\u300c\u5c42\uff08layer\uff09\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/02\/image-128-1024x801.png\" alt=\"\" class=\"wp-image-1839\" width=\"389\" height=\"303\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-128-1024x801.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-128-300x235.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-128-768x601.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-128-230x180.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-128-350x274.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/02\/image-128.png 1178w\" sizes=\"(max-width: 389px) 100vw, 389px\" \/><\/figure><\/div>\n\n\n\n<p>\u4e8b\u5b9e\u4e0a\uff0c\u6211\u4eec\u7684\u539f\u59cb\u955c\u50cf\uff0c\u4e5f\u53ef\u80fd\u662f\u7531\u53e6\u4e00\u4e2a\u955c\u50cf\u548c\u53e6\u4e00\u4e2a\u300c\u5c42\u300d\u7ec4\u6210\u3002\u5982\u6b64\u8ffd\u6eaf\u4e0b\u53bb\uff0c\u4f1a\u53d1\u73b0\u6700\u5f00\u59cb\u7684\u955c\u50cf\uff0c\u662f\u300c\u7a7a\u955c\u50cf\u300d\u3002\u6240\u4ee5\uff0cDocker\u955c\u50cf\u7684\u7ed3\u6784\uff0c\u672c\u8d28\u4e0a\u5c31\u662f\u4e00\u5c42\u5c42\u6570\u636e\u589e\u91cf\u7684\u5806\u53e0\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Dockerfile<\/h5>\n\n\n\n<p>\u540c\u4e00\u955c\u50cf\uff0c\u6709\u65f6\u4ee3\u7801\u6216\u914d\u7f6e\u6539\u53d8\uff0c\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u6784\u5efa\u3002\u4e3a\u4e86\u63d0\u9ad8\u6548\u7387\uff0c\u6211\u4eec\u8981\u8bbe\u6cd5\u8ba9\u8fd9\u4e9b\u53ef\u91cd\u590d\u6267\u884c\u7684\u4ee3\u7801\u5c3d\u91cf\u81ea\u52a8\u5316\u3002\u5728\u865a\u62df\u673a\u65f6\u4ee3\uff0c\u56e0\u4e3a\u4f9d\u8d56\u8f83\u591a\uff0c\u6211\u4eec\u4e0d\u5f97\u4e0d\u501f\u52a9\u4e8e\u8bf8\u5982Ansible\u3001Chef\u4e4b\u7c7b\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u5de5\u5177\u3002\u8fd9\u6837\u7684\u65b9\u5f0f\u5728\u5bb9\u5668\u4e2d\u867d\u7136\u4e5f\u53ef\u884c\uff0c\u4e0d\u8fc7Docker\u63d0\u4f9b\u4e86\u4e00\u79cd\u66f4\u52a0\u5de7\u5999\u7684\u89e3\u51b3\u65b9\u6848\u2014\u2014Dockerfile\u3002<\/p>\n\n\n\n<p>\u7f16\u5199Dockerfile\u65f6\uff0c\u6709\u4e00\u5957\u7b80\u5355\u7684\u8bed\u6cd5\uff0c\u5305\u62ec\u4e00\u4e9b\u57fa\u672c\u7684\u547d\u4ee4\u3002\u4f8b\u5982<code>FROM<\/code>\u9009\u62e9\u57fa\u7840\u955c\u50cf\uff0c<code>COPY<\/code>\u62f7\u8d1d\u6587\u4ef6\uff0c<code>RUN &lt;cmd><\/code>\u6267\u884c\u547d\u4ee4\u7b49\u3002\u6bcf\u4e00\u884c\u8bed\u53e5\uff0c\u53ef\u4ee5\u8868\u793a\u955c\u50cf\u4e2d\u7684\u4e00\u5c42\u3002\u6267\u884c\u4e00\u884c\u8bed\u53e5\u65f6\uff0cDocker\u4f1a\u57fa\u4e8e\u4e0a\u4e00\u884c\u751f\u6210\u7684\u955c\u50cf\uff0c\u8fd0\u884c\u4e00\u4e2a\u5bb9\u5668\uff0c\u7136\u540e\u5728\u5bb9\u5668\u4e2d\u6267\u884c\u8fd9\u884c\u8bed\u53e5\u4ee3\u8868\u7684\u547d\u4ee4\uff0c\u968f\u540e\u628a\u6267\u884c\u8fd9\u884c\u8bed\u53e5\u6240\u4ea7\u751f\u7684\u300c\u5c42\u300d\u4fdd\u5b58\u4e0b\u6765\uff0c\u751f\u6210\u65b0\u7684\u955c\u50cf\u3002<\/p>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355Node.Js\u7a0b\u5e8f\u7684Dockerfile\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">FROM alpine\nRUN apk update &amp;&amp; apk upgrade \\\n  &amp;&amp; apk add --update --no-cache nodejs npm\nRUN rm -rf \/var\/cache\/apk\/*\nWORKDIR \/app\nCOPY src\/package.json \/app\nRUN npm i\nCOPY src \/app\nEXPOSE 80\nENTRYPOINT [\"\/bin\/sh\", \"-c\", \"node index.js\"]<\/pre>\n\n\n\n<p>\u5728\u6267\u884c\u955c\u50cf\u6784\u5efa\u65f6\uff0c\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u8f93\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">...\nStep 3\/9 : RUN rm -rf \/var\/cache\/apk\/*\n ---> Running in 8b4c21e41f5d\nRemoving intermediate container 8b4c21e41f5d\n ---> df5172370dc1\nStep 4\/9 : WORKDIR \/app\n ---> Running in 064c9126723f\nRemoving intermediate container 064c9126723f\n ---> bad0bb1f5137\nStep 5\/9 : COPY app\/package.json \/app\n ...\n<\/pre>\n\n\n\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u6839\u636e\u6587\u4ef6\u884c\u6570\uff0810\uff09\uff0cDocker\u5728\u6784\u5efa\u65f6\u5206\u4e3a\u4e869\u6b65\uff08\u7b2c\u4e00\u884c\u662fbase image\uff09\u3002\u6bcf\u4e00\u6b65\u90fd\u4f1a\u8fd0\u884c\u4e00\u4e2a\u5bb9\u5668\u3001\u751f\u6210\u4e00\u4e2a\u955c\u50cf\u3002<\/p>\n\n\n\n<p>\u5728\u901a\u8fc7Dockerfile\u6784\u5efa\u955c\u50cf\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4ea7\u751f\u7684\u8fd9\u4e9b\u4e34\u65f6\u955c\u50cf\u5e76\u4e0d\u4f1a\u88ab\u6254\u6389\u3002Docker\u4f1a\u5728\u4e0b\u6b21\u6267\u884c\u6784\u5efa\u65f6\uff0c\u4f1a\u81ea\u52a8\u6839\u636e\u4e00\u4e9b\u89c4\u5219\u53bb\u5224\u65ad\u8fd9\u884c\u8bed\u53e5\u662f\u5426\u4f1a\u548c\u4e0a\u6b21\u6784\u5efa\u7ed3\u679c\u4e0d\u540c\uff0c\u5982\u679c\u76f8\u540c\u5219\u76f4\u63a5\u4f7f\u7528\u4e0a\u6b21\u7684\u7f13\u5b58\uff0c\u800c\u4e0d\u662f\u518d\u6b21\u6784\u5efa\u3002\u57fa\u4e8e\u8fd9\u9879\u6280\u672f\uff0cDocker\u955c\u50cf\u5728\u6784\u5efa\u65f6\u53ef\u4ee5\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u4e0a\u8ff0\u540c\u6837\u7684\u6784\u5efa\u6211\u91cd\u590d\u6267\u884c\u65f6\uff0c\u8f93\u51fa\u4f1a\u53d8\u6210\u8fd9\u6837\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">...\nStep 3\/9 : RUN rm -rf \/var\/cache\/apk\/*\n ---> Using cache\n ---> df5172370dc1\nStep 4\/9 : WORKDIR \/app\n ---> Using cache\n ---> bad0bb1f5137\nStep 5\/9 : COPY app\/package.json \/app\n ---> Using cache\n ---> 46aa3717f438\n...\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u5c42\u300d\u8fd9\u4e2a\u6982\u5ff5\u5728\u8f6f\u4ef6\u9886\u57df\u975e\u5e38\u5e38\u89c1\u3002\u901a\u8fc7\u300c\u5206\u5c42\u300d\uff0c\u53ef\u4ee5\u628a\u4e0d\u540c\u9886\u57df\u7684\u95ee\u9898\u9694\u79bb\u5f00\uff0c\u5355\u72ec\u89e3\u51b3\u3002\u67b6\u6784\u4e0a\u6709MVC\uff0c\u5373\u6a21\u578b\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1829"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1829"}],"version-history":[{"count":6,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1829\/revisions"}],"predecessor-version":[{"id":1840,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/1829\/revisions\/1840"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}