{"id":361,"date":"2023-01-07T13:53:44","date_gmt":"2023-01-07T05:53:44","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=361"},"modified":"2023-05-28T01:23:17","modified_gmt":"2023-05-27T17:23:17","slug":"docker-%e4%bd%bf%e7%94%a8%e8%b6%8a%e4%b9%85%ef%bc%8c%e7%a3%81%e7%9b%98%e5%8d%a0%e7%94%a8%e8%b6%8a%e5%a4%a7%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/linux\/docker-%e4%bd%bf%e7%94%a8%e8%b6%8a%e4%b9%85%ef%bc%8c%e7%a3%81%e7%9b%98%e5%8d%a0%e7%94%a8%e8%b6%8a%e5%a4%a7%ef%bc%9f\/","title":{"rendered":"Docker \u4f7f\u7528\u8d8a\u4e45\uff0c\u78c1\u76d8\u5360\u7528\u8d8a\u5927\uff1f"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"markdown\u7f16\u8f91\u5668\" data-website=\"https:\/\/markdown.com.cn\/editor\" style=\"font-size: 16px;color: black;padding: 25px 30px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;margin-top: -10px;\">\n<h1 style=\"box-sizing: border-box;margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 24px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;white-space: normal;background-color: rgb(255, 255, 255);\"><span style=\"box-sizing: border-box;\">\u524d\u8a00<\/span><\/h1>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u4eca\u5929\u5728\u5f00\u53d1\u73af\u5883\u7684mysql\u6570\u636e\u5e93\u91cc\u5efa\u8868\u65f6\u63d0\u793a\u78c1\u76d8\u7a7a\u95f4\u5df2\u6ee1\uff0c\u6253\u5f00shell\u5de5\u5177\u67e5\u9605\u53d1\u73b0\u5f00\u53d1\u670d\u52a1\u5668\u91cc\u976240g\u7684\u786c\u76d8\u7a7a\u95f4\uff0c\u53ea\u670920k\u7684\u53ef\u7528\u7a7a\u95f4\u4e86\u3002<\/p>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u9047\u5230\u8fd9\u79cd\u95ee\u9898\uff0c\u9996\u5148\u9700\u8981\u5b9a\u4f4d\u662f\u54ea\u4e9b\u76ee\u5f55\u5bfc\u81f4\u78c1\u76d8\u7a7a\u95f4\u5360\u7528\u8fc7\u5927\u7684\u60c5\u51b5\u3002<\/p>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6211\u4eec\u5148\u8f93\u5165\u811a\u672c<code style=\"font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">df -h<\/code>\u67e5\u770b\u670d\u52a1\u5668\u7684\u78c1\u76d8\u5360\u7528\u60c5\u51b5\uff0c\u53d1\u73b0<code style=\"font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">FileSystem<\/code>\u4e3a<code style=\"font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">overlay<\/code>\uff0c\u6302\u8f7d\u76ee\u5f55\u4e3a<code style=\"font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">\/var\/lib\/docker\/overlay2\/xxx<\/code>\u5360\u7528\u5927\u91cf\u7684\u78c1\u76d8\u7a7a\u95f4\u3002<\/p>\n<h2 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;\"><span style=\"display: none;\"><\/span>\u91ca\u653edocker overlay2\u5360\u7528\u7684\u7a7a\u95f4<\/h2>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u7528\u8fc7docker\u7684\u591a\u5c11\u90fd\u6e05\u695a\uff0coverlay2\u662fdocker\u7684\u5b58\u50a8\u670d\u52a1\uff0cdocker\u5bb9\u5668\u5728\u8fd0\u884c\u4e2d\u4ea7\u751f\u7684\u4e00\u7cfb\u5217\u6587\u4ef6\u90fd\u4f1a\u5728<code style=\"font-size: 14px;overflow-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">\/var\/lib\/docker\/overlay2<\/code>\u76ee\u5f55\u6709\u6240\u53cd\u9988\uff0c\u6240\u4ee5\u5f53\u6211\u4eec\u627e\u5230\u4e86\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\u7684\u76ee\u5f55\u540e\u5b9a\u4f4d\u8fdb\u53bb\uff0c\u627e\u5230\u5bf9\u5e94\u7684\u5bb9\u5668\u4e00\u5207\u5c31\u597d\u89e3\u51b3\u4e86\u3002<\/p>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u6700\u7ec8\u53d1\u73b0\u662f\u6211\u7684\u4e00\u4e2a.NetCore Work docker\u5bb9\u5668\u670d\u52a1\u6bcf\u5929\u90fd\u4ea7\u751f\u4e86\u65e5\u5fd7\uff0c\u4e14\u65e5\u5fd7\u5b58\u50a8\u5728\u5bb9\u5668\u7684logs\u76ee\u5f55\u4e0b\uff0c\u5373\u4f7f\u6211\u7684docker\u65e5\u5fd7\u670d\u52a1\u4f7f\u7528\u4e86loki\u8fdb\u884c\u91c7\u96c6\u4e14\u505a\u4e86\u65e5\u5fd7\u7684\u9650\u5b9a\u5bb9\u91cf\u914d\u7f6e\u4e5f\u4e8e\u4e8b\u65e0\u8865\uff0c\u56e0\u4e3adocker\u7684\u65e5\u5fd7\u670d\u52a1\u53ea\u4f1a\u5bf9\u91c7\u96c6\u7684\u65e5\u5fd7\u8fdb\u884c\u5904\u7406\uff0c\u5bf9\u4e8e\u5bb9\u5668\u5185\u7684\u5e94\u7528\u5b58\u50a8\u7684\u65e5\u5fd7\u6587\u4ef6\u5b83\u662f\u65e0\u6743\u8fdb\u884c\u5904\u7406\u7684\u3002<\/p>\n<h2 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;\"><span style=\"display: none;\"><\/span>\u5b9a\u4f4d\u95ee\u9898\u4e2d\u4f7f\u7528\u5230\u7684\u547d\u4ee4<\/h2>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">\u8fd9\u6b21\u5b9a\u4f4d\u95ee\u9898\u4e5f\u7528\u5230\u4e86\u4e00\u4e9b\u6bd4\u8f83\u5b9e\u7528\u7684\u547d\u4ee4\uff0c\u8fd9\u91cc\u4e5f\u8bb0\u5f55\u4e0b\u6765\u5206\u4eab\u4e00\u6ce2\u3002<\/p>\n<table data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\">\n<thead>\n<tr style=\"border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\">\n<th style=\"border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);\">\u547d\u4ee4<\/th>\n<th style=\"border-top-width: 1px;border-color: rgb(204, 204, 204);text-align: left;background-color: rgb(240, 240, 240);\">\u5907\u6ce8<\/th>\n<\/tr>\n<\/thead>\n<tbody style=\"border-width: 0px;border-style: initial;border-color: initial;\">\n<tr style=\"border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\">\n<td style=\"border-color: rgb(204, 204, 204);\">df -h<\/td>\n<td style=\"border-color: rgb(204, 204, 204);\">\u67e5\u770b\u670d\u52a1\u5668\u7684\u78c1\u76d8\u5360\u7528\u60c5\u51b5<\/td>\n<\/tr>\n<tr style=\"border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\">\n<td style=\"border-color: rgb(204, 204, 204);\">du -sh *<\/td>\n<td style=\"border-color: rgb(204, 204, 204);\">\u67e5\u770b\u5f53\u524d\u76ee\u5f55\u4e0b\u5404\u6587\u4ef6\u53ca\u76ee\u5f55\u7684\u78c1\u76d8\u5360\u7528\u60c5\u51b5<\/td>\n<\/tr>\n<tr style=\"border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\">\n<td style=\"border-color: rgb(204, 204, 204);\"><code>find \/var\/lib\/docker\/overlay2\/ -type f -size +100M -print0 | xargs -0 du -h | sort -nr<\/code><\/td>\n<td style=\"border-color: rgb(204, 204, 204);\">\u67e5\u627e\u6307\u5b9a\u76ee\u5f55\u4e0b\u6240\u6709\u5927\u4e8e100M\u7684\u6240\u6709\u6587\u4ef6,\u8fd9\u91cc\u6307\u5b9a\u7684\u76ee\u5f55\u5c31\u662f \/var\/lib\/docker\/overlay2\/<\/td>\n<\/tr>\n<tr style=\"border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);\">\n<td style=\"border-color: rgb(204, 204, 204);\">docker volume prune<\/td>\n<td style=\"border-color: rgb(204, 204, 204);\">\u5220\u9664docker\u670d\u52a1\u65e0\u7528\u7684\u5377<\/td>\n<\/tr>\n<tr style=\"border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: white;\">\n<td style=\"border-color: rgb(204, 204, 204);\">docker network prune<\/td>\n<td style=\"border-color: rgb(204, 204, 204);\">\u5220\u9664docker\u670d\u52a1\u65e0\u7528\u7684\u7f51\u7edc<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;\"><span style=\"display: none;\"><\/span>\u603b\u7ed3<\/h2>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">1\u3001\u5f00\u53d1\u7684\u5e94\u7528\u5982\u679c\u91c7\u53d6\u5bb9\u5668\u5316\u90e8\u7f72\u65f6\uff0c\u5bf9\u4e8e\u4f1a\u7d2f\u8ba1\u589e\u957f\u78c1\u76d8\u4f7f\u7528\u7a7a\u95f4\u7684\u5730\u65b9\u9700\u8981\u4f7f\u7528\u4e0e\u5bbf\u4e3b\u6620\u5c04\u7684\u65b9\u5f0f\u5f00\u653e\u51fa\u6765\uff0c\u660e\u786e\u7684\u544a\u77e5\u5bbf\u4e3b\u65b9\uff0c\u65b9\u4fbf\u6e05\u7406\uff1b&nbsp;<\/p>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">2\u3001\u5bf9\u4e8e\u7d2f\u8ba1\u589e\u957f\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u91c7\u53d6\u81ea\u52a8\u5220\u9664\u7684\u65b9\u5f0f\u4fdd\u8bc1\u78c1\u76d8\u7a7a\u95f4\u7684\u81a8\u80c0\u95ee\u9898\uff1b<\/p>\n<p data-tool=\"markdown.com.cn\u7f16\u8f91\u5668\" style=\"padding-top: 8px;padding-bottom: 8px;line-height: 26px;\">3\u3001\u751f\u4ea7\u670d\u52a1\u505a\u597d\u5de1\u68c0\uff0c\u95ee\u9898\u53ca\u65f6\u53d1\u73b0\uff0c\u53ca\u65f6\u89e3\u51b3\uff1b<\/p>\n<\/section>\n<p><br  \/><\/p>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7801\u519c\u8bf4\u4e00\u8bf4              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u4eca\u5929\u5728\u5f00\u53d1\u73af\u5883\u7684mysql\u6570\u636e\u5e93\u91cc\u5efa\u8868\u65f6\u63d0\u793a\u78c1\u76d8\u7a7a\u95f4\u5df2\u6ee1\uff0c\u6253\u5f00shell\u5de5\u5177\u67e5\u9605\u53d1\u73b0\u5f00\u53d1\u670d\u52a1\u5668\u91cc\u976240g\u7684\u786c\u76d8\u7a7a\u95f4\uff0c\u53ea\u670920 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":360,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004852350-150x150.jpeg","content_first_image":null,"post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004852350-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004852350-1024x435.jpeg","post_frist_image":null,"post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004852350-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004852350-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528004852350.jpeg","post_all_images":[],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Linux","post_date":"2023-01-07","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":369,"next_post_id":255,"next_post_title":"SpringBoot + minio\u5b9e\u73b0\u5206\u7247\u4e0a\u4f20\u3001\u79d2\u4f20\u3001\u7eed\u4f20","previous_post_id":30,"previous_post_title":"centos7\u5f00\u653e\u53ca\u67e5\u770b\u7aef\u53e3","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/360"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}