{"id":8761,"date":"2024-09-14T10:04:31","date_gmt":"2024-09-14T02:04:31","guid":{"rendered":"http:\/\/999.zuizhuai.cn\/?p=8761"},"modified":"2024-09-14T10:04:31","modified_gmt":"2024-09-14T02:04:31","slug":"docker%e5%ae%98%e6%96%b9%e7%a7%81%e6%9c%89%e9%95%9c%e5%83%8f%e4%bb%93%e5%ba%93%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=8761","title":{"rendered":"docker\u5b98\u65b9\u79c1\u6709\u955c\u50cf\u4ed3\u5e93\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<section style=\"margin-bottom: 0px; padding-left: 10px; padding-right: 10px; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; , pingfangsc-regular, serif;font-size: 16px; line-height: 1.5em; letter-spacing: 0em; text-align: left;\" data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\">\n<h1 style=\"margin-top: 30px; margin-bottom: 15px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 24px; line-height: 1.5em; letter-spacing: 0em; font-weight: bold;\">\u955c\u50cf\u4ed3\u5e93 Docker Registry \u5b9e\u8df5-http\u534f\u8bae<\/span><\/h1>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u955c\u50cf\u4ed3\u5e93\uff08Registry\uff09\u662f\u5b58\u50a8\u548c\u5206\u53d1\u5bb9\u5668\u955c\u50cf\u7684\u670d\u52a1\u5668\u5e94\u7528\u3002\u5bb9\u5668\u955c\u50cf\u662f\u5bb9\u5668\u7684\u53ef\u79fb\u690d\u6253\u5305\u683c\u5f0f\uff0c\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u4f9d\u8d56\u7684\u6240\u6709\u5185\u5bb9\u3002\u955c\u50cf\u4ed3\u5e93\u4e3b\u8981\u7528\u4e8e\u5b58\u50a8\u8fd9\u4e9b\u955c\u50cf\uff0c\u5e76\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u7f51\u7edc\u5c06\u955c\u50cf\u62c9\u53d6\u5230\u672c\u5730\u8fdb\u884c\u90e8\u7f72\u3002<\/p>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong style=\"background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; border-style: none; border-width: 3px; border-radius: 0px;\">\u955c\u50cf\u4ed3\u5e93\u7684\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><strong style=\"background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; border-style: none; border-width: 3px; border-radius: 0px;\">\u955c\u50cf\u5b58\u50a8<\/strong>: \u63d0\u4f9b\u96c6\u4e2d\u5f0f\u5b58\u50a8\uff0c\u7ba1\u7406\u591a\u79cd\u7248\u672c\u7684\u5bb9\u5668\u955c\u50cf\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><strong style=\"background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; border-style: none; border-width: 3px; border-radius: 0px;\">\u955c\u50cf\u5206\u53d1<\/strong>: \u901a\u8fc7\u7f51\u7edc\u5206\u53d1\u955c\u50cf\uff0c\u652f\u6301\u591a\u79cd\u955c\u50cf\u4f20\u8f93\u534f\u8bae\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><strong style=\"background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; border-style: none; border-width: 3px; border-radius: 0px;\">\u6743\u9650\u63a7\u5236<\/strong>: \u901a\u8fc7\u7528\u6237\u8ba4\u8bc1\u548c\u6388\u6743\u7ba1\u7406\u5bf9\u955c\u50cf\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><strong style=\"background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; border-style: none; border-width: 3px; border-radius: 0px;\">\u955c\u50cf\u7ba1\u7406<\/strong>: \u63d0\u4f9b\u955c\u50cf\u7684\u6807\u7b7e\u3001\u7248\u672c\u63a7\u5236\u7b49\u7ba1\u7406\u529f\u80fd\u3002<\/section>\n<\/li>\n<\/ol>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><strong style=\"background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; border-style: none; border-width: 3px; border-radius: 0px;\">Docker Registry<\/strong> \u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u955c\u50cf\u4ed3\u5e93\u5b9e\u73b0\uff0c\u5141\u8bb8\u7528\u6237\u5728\u672c\u5730\u6216\u4e91\u7aef\u642d\u5efa\u81ea\u5df1\u7684\u955c\u50cf\u4ed3\u5e93\uff0c\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u955c\u50cf\u5b58\u50a8\u548c\u5206\u53d1\u529f\u80fd\u3002<\/p>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e0b\u9762\u8bb0\u5f55\u5728\u672c\u5730\u673a\u5668\uff08\u5df2\u7ecf\u5b89\u88c5docker\uff09\u642d\u5efa\u548c\u4f7f\u7528 Docker Registry\u3002<\/p>\n<h2 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><span style=\"font-size: 22px; line-height: 1.5em; letter-spacing: 0em; background-attachment: scroll; background-image: linear-gradient(0deg, #ffb11b 40%, transparent 40%); background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; align-items: unset; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; justify-content: unset; overflow: unset; padding: 2px 13px; text-indent: 0em;\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span>1. \u90e8\u7f72 Docker Registry<span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/span><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/h2>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4f7f\u7528 Docker \u5bb9\u5668\u8fd0\u884c\u4e00\u4e2a Registry \u670d\u52a1\uff1a<\/p>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">docker\u00a0run\u00a0-d\u00a0-p\u00a05000:5000\u00a0--restart=always\u00a0--name\u00a0registry\u00a0-v\u00a0\/mnt\/registry:\/var\/lib\/registry\u00a0registry:2\n\nroot@harbor:~\/harbor<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">#\u00a0docker\u00a0run\u00a0-d\u00a0-p\u00a05000:5000\u00a0--restart=always\u00a0--name\u00a0registry\u00a0-v\u00a0\/mnt\/registry:\/var\/lib\/registry\u00a0registry:2<\/span>\n2c60ce3bd400bf8307869e17b2b6308e8ab4a5c1a905378ac4386bfc76585227\nroot@harbor:~<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">#\u00a0docker\u00a0ps<\/span>\nCONTAINER\u00a0ID\u00a0\u00a0\u00a0IMAGE\u00a0\u00a0\u00a0\u00a0\u00a0COMMAND\u00a0\u00a0\u00a0\u00a0\u00a0CREATED\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0STATUS\u00a0\u00a0\u00a0\u00a0\u00a0PORTS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0NAMES\n2c60ce3bd400\u00a0\u00a0\u00a0registry:2\u00a0\u00a0\u00a0<span style=\"color: #98c379; line-height: 26px;\">\"\/entrypoint.sh\u00a0\/etc\u2026\"<\/span>\u00a0\u00a0\u00a0About\u00a0a\u00a0minute\u00a0ago\u00a0\u00a0\u00a0Up\u00a0About\u00a0a\u00a0minute\u00a0\u00a0\u00a00.0.0.0:5000-&gt;5000\/tcp,\u00a0:::5000-&gt;5000\/tcp\u00a0\u00a0\u00a0registry\n<\/code><\/pre>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">\/mnt\/registry<\/code>\uff1a\u5bbf\u4e3b\u673a\u8def\u5f84\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">\/var\/lib\/registry<\/code>\uff1a<code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">Registry<\/code>\u5bb9\u5668\u5b58\u653e\u955c\u50cf\u7684\u8def\u5f84\uff0c\u8def\u5f84\u662f\u56fa\u5b9a\u7684\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u8fd9\u4f1a\u542f\u52a8\u4e00\u4e2a\u5728\u672c\u5730\u76d1\u542c 5000 \u7aef\u53e3\u7684\u955c\u50cf\u4ed3\u5e93\u670d\u52a1\u3002<\/p>\n<blockquote style=\"margin-top: 20px; margin-bottom: 20px; padding: 10px 10px 10px 20px; border-radius: 0px; width: auto; height: auto; overflow: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<p style=\"text-indent: 0em; padding-top: 8px; padding-bottom: 8px; font-size: 16px; line-height: 1.8em; letter-spacing: 0em;\">\u8bf4\u660e\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; font-size: 16px; line-height: 1.8em; letter-spacing: 0em;\">Docker \u4f7f\u7528 \/var\/lib\/docker \u4f5c\u4e3a\u9ed8\u8ba4\u8def\u5f84\u6765\u5b58\u50a8\u6240\u6709 Docker \u76f8\u5173\u6587\u4ef6\uff08\u5305\u62ec\u955c\u50cf\uff09\u3002\u5efa\u8bae\u60a8\u6dfb\u52a0\u9644\u52a0\u5b58\u50a8\u5377\uff0c\u5206\u522b\u7ed9 \/var\/lib\/docker \u548c \/mnt\/registry \u6302\u8f7d\u81f3\u5c11 100G\u3002<\/section>\n<\/li>\n<\/ol>\n<\/blockquote>\n<h2 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><span style=\"font-size: 22px; line-height: 1.5em; letter-spacing: 0em; background-attachment: scroll; background-image: linear-gradient(0deg, #ffb11b 40%, transparent 40%); background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; align-items: unset; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; justify-content: unset; overflow: unset; padding: 2px 13px; text-indent: 0em;\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span>2. \u62c9\u53d6\u3001\u63a8\u9001\u955c\u50cf\u5230 Registry<span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/span><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/h2>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u62c9\u53d6\u3001\u63a8\u9001\u955c\u50cf\u8fc7\u7a0b\u4e0e\u4e00\u822c\u4f7f\u7528\u5176\u4ed6\u955c\u50cf\u4ed3\u5e93\u65f6\u7684\u64cd\u4f5c\u7c7b\u4f3c\uff0c\u5982\u679c\u5ba2\u6237\u7aef\u548cregistry\u4f4d\u4e8e\u540c\u4e00\u53f0\u673a\u5668\uff0chost\u4e3alocalhost\uff1b\u5982\u679c\u5ba2\u6237\u7aef\u4f4d\u4e8e\u8fdc\u7aef\uff0c\u4f7f\u7528registry\u6240\u5728\u673a\u5668\u7684ip\u5730\u5740\u4f5c\u4e3ahost\u3002<\/p>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px; line-height: 1.8em; letter-spacing: 0em; padding-left: 20px; border-style: none none none solid; border-width: 1px 1px 1px 3px; border-radius: 0px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-indent: 0em; width: auto;\">2.1 \u8c03\u7528\u63a5\u53e3\u67e5\u770b\u5f53\u524d\u4ed3\u5e93\u955c\u50cf\u5217\u8868<\/span><\/h3>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"font-size: 14px; line-height: 1.8em; letter-spacing: 0em; width: auto; height: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">Docker Registry<\/code>\u6ca1\u6709\u50cfharbor\u90a3\u6837\u7684web\u754c\u9762\u53ef\u4ee5\u76f4\u89c2\u7684\u67e5\u770b\u955c\u50cf\u4ed3\u5e93\u5217\u8868\uff0c\u9700\u8981\u901a\u8fc7\u8c03\u7528\u63a5\u53e3\u67e5\u770b\uff1a<\/p>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">curl\u00a0-X\u00a0GET\u00a0http:\/\/IP:port\/v2\/_catalog\n<\/code><\/pre>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4ee5\u672c\u5730\u8c03\u7528\u67e5\u770b\u4e3a\u4f8b\uff0c\u7531\u4e8e\u662f\u65b0\u642d\u5efa\u7684registry\u5b9e\u4f8b\uff0c\u4ed3\u5e93\u4e2d\u662f\u7a7a\u7684\uff1a<\/p>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">root@harbor:~#\u00a0curl\u00a0-X\u00a0GET\u00a0http:\/\/localhost:5000\/v2\/_catalog\n{\"repositories\":[]}\n<\/code><\/pre>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px; line-height: 1.8em; letter-spacing: 0em; padding-left: 20px; border-style: none none none solid; border-width: 1px 1px 1px 3px; border-radius: 0px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-indent: 0em; width: auto;\">2.2 \u63a8\u9001\u955c\u50cf<\/span><\/h3>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5c06\u955c\u50cf\u63a8\u9001\u5230\u672c\u5730\u642d\u5efa\u7684 Registry \u4e2d\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\">\u4e3a\u955c\u50cf\u6253\u6807\u7b7e\uff0c\u4f7f\u5176\u6307\u5411\u672c\u5730 Registry\uff1a<\/section>\n<\/li>\n<\/ol>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">docker\u00a0tag\u00a0&lt;image-name&gt;\u00a0localhost:5000\/&lt;your-image-name&gt;:tag\n<\/code><\/pre>\n<ol class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\" start=\"2\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\">\u5c06\u955c\u50cf\u63a8\u9001\u5230\u672c\u5730 Registry\uff1a<\/section>\n<\/li>\n<\/ol>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">docker\u00a0push\u00a0localhost:5000\/&lt;your-image-name&gt;:tag\n<\/code><\/pre>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4ee5\u672c\u5730\u7684kubernetes dashboard\u955c\u50cf\u63a8\u9001\u4e3a\u4f8b\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">root@harbor:~#\u00a0docker\u00a0tag\u00a0kubernetesui\/dashboard:v2.7.0\u00a0localhost:5000\/kubernetesui\/dashboard:v2.7.0\nroot@harbor:~#\u00a0docker\u00a0push\u00a0localhost:5000\/kubernetesui\/dashboard:v2.7.0\nThe\u00a0push\u00a0refers\u00a0to\u00a0repository\u00a0[localhost:5000\/kubernetesui\/dashboard]\nc88361932af5:\u00a0Pushed\nbd8a70623766:\u00a0Pushed\nv2.7.0:\u00a0digest:\u00a0sha256:ef134f101e8a4e96806d0dd839c87c7f76b87b496377422d20a65418178ec289\u00a0size:\u00a0736\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u518d\u6b21\u8c03\u7528\u63a5\u53e3\u67e5\u770b\u955c\u50cf\u5217\u8868<\/span>\nroot@harbor:~#\u00a0curl\u00a0-X\u00a0GET\u00a0http:\/\/localhost:5000\/v2\/_catalog\n{\"repositories\":[\"kubernetesui\/dashboard\"]}\n<span style=\"color: #61aeee; line-height: 26px;\">#<\/span><span style=\"line-height: 26px;\">\u00a0\u67e5\u770b\u955c\u50cf\u7684tag\u5217\u8868<\/span>\nroot@harbor:~#\u00a0curl\u00a0-X\u00a0GET\u00a0http:\/\/localhost:5000\/v2\/kubernetesui\/dashboard\/tags\/list\n{\"name\":\"kubernetesui\/dashboard\",\"tags\":[\"v2.7.0\"]}\n<\/code><\/pre>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px; line-height: 1.8em; letter-spacing: 0em; padding-left: 20px; border-style: none none none solid; border-width: 1px 1px 1px 3px; border-radius: 0px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-indent: 0em; width: auto;\">2.3 \u00a0\u62c9\u53d6\u955c\u50cf<\/span><\/h3>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4ece\u672c\u5730 Registry \u4e2d\u62c9\u53d6\u955c\u50cf\uff1a<\/p>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\">docker\u00a0pull\u00a0localhost:5000\/&lt;your-image-name&gt;:tag\n\nroot@harbor:~<span style=\"color: #5c6370; font-style: italic; line-height: 26px;\">#\u00a0docker\u00a0pull\u00a0localhost:5000\/kubernetesui\/dashboard:v2.7.0<\/span>\nv2.7.0:\u00a0Pulling\u00a0from\u00a0kubernetesui\/dashboard\nDigest:\u00a0sha256:ef134f101e8a4e96806d0dd839c87c7f76b87b496377422d20a65418178ec289\nStatus:\u00a0Image\u00a0is\u00a0up\u00a0to\u00a0date\u00a0<span style=\"color: #c678dd; line-height: 26px;\">for<\/span>\u00a0localhost:5000\/kubernetesui\/dashboard:v2.7.0\nlocalhost:5000\/kubernetesui\/dashboard:v2.7.0\n<\/code><\/pre>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px; line-height: 1.8em; letter-spacing: 0em; padding-left: 20px; border-style: none none none solid; border-width: 1px 1px 1px 3px; border-radius: 0px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-indent: 0em; width: auto;\">2.4 \u4ece\u8fdc\u7aef\u63a8\u9001\u62c9\u53d6<\/span><\/h3>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u5982\u679c\u662fhttp\u534f\u8bae\u90e8\u7f72\uff0c\u5ba2\u6237\u7aef\u4fa7\u8fdc\u7aef\u63a8\u9001\u9700\u8981\u4fe1\u4efb\u914d\u7f6e\uff0c\u4ee5docker\u4e3a\u4f8b\uff0c\u7f16\u8f91<code style=\"font-size: 14px; line-height: 1.8em; letter-spacing: 0em; width: auto; height: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">\/etc\/docker\/daemon.json<\/code>:<\/p>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\"><span style=\"color: #61aeee; line-height: 26px;\">#<\/span><span style=\"line-height: 26px;\">\u00a0\u4f8b\u5982registry\u642d\u5efa\u5728ip\u4e3a192.168.0.156\u7684\u673a\u5668\u4e0a\uff0c\u5728\u53e6\u5916\u7684\u673a\u5668\u4e0a\u914d\u7f6e\u8fdb\u884c\u62c9\u53d6\u63a8\u9001<\/span>\n[root@k8s\u00a0~]#\u00a0cat\u00a0\/etc\/docker\/daemon.json\n{\n\u00a0\u00a0\u00a0\"insecure-registries\":\u00a0[\"http:\/\/192.168.0.156:5000\"]\n}\n<span style=\"color: #61aeee; line-height: 26px;\">#<\/span><span style=\"line-height: 26px;\">\u00a0\u91cd\u542fdocker\u751f\u6548<\/span>\nsystemctl\u00a0daemon-reload;\u00a0systemctl\u00a0restart\u00a0docker\n\n[root@k8s\u00a0~]#\u00a0\u00a0docker\u00a0pull\u00a0192.168.0.156:5000\/kubernetesui\/dashboard:v2.7.0\nv2.7.0:\u00a0Pulling\u00a0from\u00a0kubernetesui\/dashboard\nee3247c7e545:\u00a0Pull\u00a0complete\n8e052fd7e2d0:\u00a0Pull\u00a0complete\nDigest:\u00a0sha256:ef134f101e8a4e96806d0dd839c87c7f76b87b496377422d20a65418178ec289\nStatus:\u00a0Downloaded\u00a0newer\u00a0image\u00a0for\u00a0192.168.0.156:5000\/kubernetesui\/dashboard:v2.7.0\n192.168.0.156:5000\/kubernetesui\/dashboard:v2.7.0\n[root@k8s\u00a0~]#\u00a0\u00a0docker\u00a0push\u00a0192.168.0.156:5000\/kubernetesui\/dashboard:v2.7.0\nThe\u00a0push\u00a0refers\u00a0to\u00a0repository\u00a0[192.168.0.156:5000\/kubernetesui\/dashboard]\nc88361932af5:\u00a0Layer\u00a0already\u00a0exists\nbd8a70623766:\u00a0Layer\u00a0already\u00a0exists\nv2.7.0:\u00a0digest:\u00a0sha256:ef134f101e8a4e96806d0dd839c87c7f76b87b496377422d20a65418178ec289\u00a0size:\u00a0736\n<\/code><\/pre>\n<h2 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><span style=\"font-size: 22px; line-height: 1.5em; letter-spacing: 0em; background-attachment: scroll; background-image: linear-gradient(0deg, #ffb11b 40%, transparent 40%); background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; align-items: unset; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; justify-content: unset; overflow: unset; padding: 2px 13px; text-indent: 0em;\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span>3. \u914d\u7f6e\u8ba4\u8bc1<span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/span><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/h2>\n<p style=\"line-height: 1.8em; letter-spacing: 0em; text-indent: 0em; padding-top: 8px; padding-bottom: 8px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\u4e0a\u8ff0\u60c5\u51b5\u4e2dDocker Registry\u662f\u5141\u8bb8\u81ea\u7531\u8bbf\u95ee\u7684\uff0c\u5982\u679c\u9700\u8981\u5f00\u653e\u7ed9\u5176\u4ed6\u4eba\u4f7f\u7528\u6216\u8005\u589e\u5f3a\u5b89\u5168\u6027\uff0c\u53ef\u4ee5\u914d\u7f6e\u8ba4\u8bc1\u3002<\/p>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px; line-height: 1.8em; letter-spacing: 0em; padding-left: 20px; border-style: none none none solid; border-width: 1px 1px 1px 3px; border-radius: 0px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-indent: 0em; width: auto;\">3.1 \u521b\u5efa\u5bc6\u7801\u6587\u4ef6<\/span><\/h3>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\"><span style=\"color: #61aeee; line-height: 26px;\">#<\/span><span style=\"line-height: 26px;\">\u00a0\u65b9\u6cd51\uff1a\u4f7f\u7528Apache\u7684htpasswd\u521b\u5efa\u52a0\u5bc6\u6587\u4ef6<\/span>\nyum\u00a0-y\u00a0install\u00a0httpd-tools\n<span style=\"color: #61aeee; line-height: 26px;\">#<\/span><span style=\"line-height: 26px;\">\u00a0\u521b\u5efa\u7ba1\u7406\u5458admin\uff0c\u5bc6\u7801\u4e3a123456\uff0c\u5b58\u5165\u5bc6\u7801\u6587\u4ef6<\/span>\nmkdir\u00a0auth\nhtpasswd\u00a0-Bbn\u00a0admin\u00a0123456\u00a0&gt;\u00a0auth\/htpasswd\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u65b9\u6cd52\uff1a\u4f7f\u7528httpd\u5bb9\u5668\u955c\u50cf\u751f\u6210<\/span>\ndocker\u00a0run\u00a0--entrypoint\u00a0htpasswd\u00a0httpd:2\u00a0-Bbn\u00a0admin\u00a0123456\u00a0&gt;\u00a0auth\/htpasswd\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u67e5\u770b\u5bc6\u7801\u6587\u4ef6<\/span>\nroot@harbor:~#\u00a0cat\u00a0auth\/htpasswd\nadmin:$2y$05$YXUsPY1os2h7BpkqNLdSQOixnzZ5YX\/DgFYH3Qyu8I.JnMvUx7mTq\n<\/code><\/pre>\n<h3 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"font-size: 18px; line-height: 1.8em; letter-spacing: 0em; padding-left: 20px; border-style: none none none solid; border-width: 1px 1px 1px 3px; border-radius: 0px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; overflow: unset; text-indent: 0em; width: auto;\">3.2 \u542f\u52a8\u5e26\u8ba4\u8bc1\u7684 Docker Registry<\/span><\/h3>\n<ul class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">REGISTRY_AUTH=htpasswd<\/code> <code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\"># \u4ee5 htpasswd \u7684\u65b9\u5f0f\u8ba4\u8bc1<\/code><\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm<\/code> <code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\"># \u6ce8\u518c\u8ba4\u8bc1<\/code><\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\"><code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\">REGISTRY_AUTH_HTPASSWD_PATH=\/auth\/htpasswd<\/code> <code style=\"width: auto; margin-left: 2px; margin-right: 2px; padding: 2px 4px; border-style: none; border-width: 3px; border-radius: 4px;\"># \u8ba4\u8bc1\u7684\u7528\u6237\u5bc6\u7801<\/code><\/section>\n<\/li>\n<\/ul>\n<pre style=\"border-radius: 5px; margin-top: 10px; margin-bottom: 10px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><code style=\"padding: 16px; color: #abb2bf; padding-top: 15px; background: #282c34; border-radius: 5px; font-family: Consolas, Monaco, Menlo, monospace; font-size: 12px;\"><span style=\"color: #61aeee; line-height: 26px;\">#<\/span><span style=\"line-height: 26px;\">\u00a0\u505c\u6b62\u5e76\u5220\u9664\u4e4b\u524d\u7684\u5bb9\u5668<\/span>\ndocker\u00a0container\u00a0stop\u00a0registry\ndocker\u00a0rm\u00a0registry\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u542f\u52a8\u5e26\u6709\u8ba4\u8bc1\u7684Registry<\/span>\ndocker\u00a0run\u00a0-d\u00a0\\\n\u00a0\u00a0-p\u00a05000:5000\u00a0\\\n\u00a0\u00a0--restart=always\u00a0\\\n\u00a0\u00a0--name\u00a0registry\u00a0\\\n\u00a0\u00a0-v\u00a0\/mnt\/registry:\/var\/lib\/registry\u00a0\\\n\u00a0\u00a0-v\u00a0\"$(pwd)\"\/auth:\/auth\u00a0\\\n\u00a0\u00a0-e\u00a0\"REGISTRY_AUTH=htpasswd\"\u00a0\\\n\u00a0\u00a0-e\u00a0\"REGISTRY_AUTH_HTPASSWD_REALM=Registry\u00a0Realm\"\u00a0\\\n\u00a0\u00a0-e\u00a0REGISTRY_AUTH_HTPASSWD_PATH=\/auth\/htpasswd\u00a0\\\n\u00a0\u00a0registry:2\u3001\n<span style=\"color: #61aeee; line-height: 26px;\">\u00a0\u00a0\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u672c\u5730\u767b\u5f55\u6d4b\u8bd5<\/span>\nroot@harbor:~#\u00a0docker\u00a0login\u00a0localhost:5000\nUsername:\u00a0admin\nPassword:\nWARNING!\u00a0Your\u00a0password\u00a0will\u00a0be\u00a0stored\u00a0unencrypted\u00a0in\u00a0\/root\/.docker\/config.json.\nConfigure\u00a0a\u00a0credential\u00a0helper\u00a0to\u00a0remove\u00a0this\u00a0warning.\u00a0See\nhttps:\/\/docs.docker.com\/engine\/reference\/commandline\/login\/#credentials-store\n\nLogin\u00a0Succeeded\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u8fdc\u7aef\u6d4b\u8bd5\u3002\u6b64\u65f6\u4ece\u8fdc\u7aef\u63a8\u9001\u63d0\u793a\u9700\u8981\u8ba4\u8bc1<\/span>\n[root@k8s\u00a0~]#\u00a0\u00a0docker\u00a0push\u00a0192.168.0.156:5000\/kubernetesui\/dashboard:v2.7.0\nThe\u00a0push\u00a0refers\u00a0to\u00a0repository\u00a0[192.168.0.156:5000\/kubernetesui\/dashboard]\nc88361932af5:\u00a0Preparing\nbd8a70623766:\u00a0Preparing\nno\u00a0basic\u00a0auth\u00a0credentials\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u767b\u5f55<\/span>\n[root@k8s\u00a0~]#\u00a0docker\u00a0login\u00a0192.168.0.156:5000\u00a0-u\u00a0admin\u00a0-p\u00a0123456\nWARNING!\u00a0Using\u00a0--password\u00a0via\u00a0the\u00a0CLI\u00a0is\u00a0insecure.\u00a0Use\u00a0--password-stdin.\nWARNING!\u00a0Your\u00a0password\u00a0will\u00a0be\u00a0stored\u00a0unencrypted\u00a0in\u00a0\/root\/.docker\/config.json.\nConfigure\u00a0a\u00a0credential\u00a0helper\u00a0to\u00a0remove\u00a0this\u00a0warning.\u00a0See\nhttps:\/\/docs.docker.com\/engine\/reference\/commandline\/login\/#credentials-store\n\nLogin\u00a0Succeeded\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u63a8\u9001\u6210\u529f<\/span>\n[root@k8s\u00a0~]#\u00a0\u00a0docker\u00a0push\u00a0192.168.0.156:5000\/kubernetesui\/dashboard:v2.7.0\nThe\u00a0push\u00a0refers\u00a0to\u00a0repository\u00a0[192.168.0.156:5000\/kubernetesui\/dashboard]\nc88361932af5:\u00a0Layer\u00a0already\u00a0exists\nbd8a70623766:\u00a0Layer\u00a0already\u00a0exists\nv2.7.0:\u00a0digest:\u00a0sha256:ef134f101e8a4e96806d0dd839c87c7f76b87b496377422d20a65418178ec289\u00a0size:\u00a0736\n<span style=\"color: #61aeee; line-height: 26px;\">\n#<\/span><span style=\"line-height: 26px;\">\u00a0\u63a5\u53e3\u8ba4\u8bc1\u6d4b\u8bd5<\/span>\n[root@k8s\u00a0~]#\u00a0curl\u00a0-X\u00a0GET\u00a0http:\/\/192.168.0.156:5000\/v2\/_catalog\u00a0-u\u00a0admin\nEnter\u00a0host\u00a0password\u00a0for\u00a0user\u00a0'admin':\n{\"repositories\":[\"kubernetesui\/dashboard\"]}\n<\/code><\/pre>\n<h2 style=\"margin-top: 30px; margin-bottom: 15px; align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; line-height: 1.5em; overflow: unset; width: auto;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><span style=\"font-size: 22px; line-height: 1.5em; letter-spacing: 0em; background-attachment: scroll; background-image: linear-gradient(0deg, #ffb11b 40%, transparent 40%); background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; width: auto; height: auto; align-items: unset; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-weight: bold; flex-direction: unset; float: unset; justify-content: unset; overflow: unset; padding: 2px 13px; text-indent: 0em;\"><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span>4. \u53c2\u8003\u8d44\u6599<span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/span><span style=\"align-items: unset; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: no-repeat; background-size: auto; border-style: none; border-width: 1px; border-radius: 0px; box-shadow: none; font-size: 22px; font-weight: bold; flex-direction: unset; float: unset; height: auto; justify-content: unset; letter-spacing: 0px; line-height: 1.5em; overflow: unset; text-indent: 0em; width: auto;\">unset<\/span><\/h2>\n<ol class=\"list-paddingleft-1\" style=\"margin-top: 8px; margin-bottom: 8px; padding-left: 25px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\">https:\/\/distribution.github.io\/distribution\/about\/deploying\/<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 1.8em; letter-spacing: 0em;\">https:\/\/distribution.github.io\/distribution\/about\/deploying\/#native-basic-auth<\/section>\n<\/li>\n<\/ol>\n<\/section>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u955c\u50cf\u4ed3\u5e93 Docker Registry \u5b9e\u8df5-http\u534f\u8bae \u955c\u50cf\u4ed3\u5e93\uff08Registry\uff09\u662f\u5b58\u50a8\u548c\u5206\u53d1\u5bb9\u5668\u955c\u50cf\u7684\u670d\u52a1\u5668\u5e94\u7528\u3002\u5bb9\u5668\u955c\u50cf\u662f\u5bb9\u5668\u7684\u53ef\u79fb\u690d\u6253\u5305\u683c\u5f0f\uff0c\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u4f9d\u8d56\u7684\u6240\u6709\u5185\u5bb9\u3002\u955c\u50cf\u4ed3\u5e93\u4e3b\u8981\u7528\u4e8e\u5b58\u50a8\u8fd9\u4e9b\u955c\u50cf\uff0c\u5e76\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u7f51\u7edc\u5c06&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[141],"tags":[159],"topic":[],"class_list":["post-8761","post","type-post","status-publish","format-standard","hentry","category-tools-soft","tag-docker"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/8761","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=8761"}],"version-history":[{"count":0,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/8761\/revisions"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8761"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8761"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=8761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}