{"id":18309,"date":"2024-11-18T10:57:04","date_gmt":"2024-11-18T02:57:04","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18309\/"},"modified":"2024-11-18T10:57:04","modified_gmt":"2024-11-18T02:57:04","slug":"docker%e5%ae%b9%e5%99%a8%e6%80%8e%e4%b9%88%e6%8b%89%e5%8f%96%e9%95%9c%e5%83%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18309\/","title":{"rendered":"docker\u5bb9\u5668\u600e\u4e48\u62c9\u53d6\u955c\u50cf"},"content":{"rendered":"<blockquote><p>\n  \u8981\u62c9\u53d6 docker \u955c\u50cf\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u767b\u5f55 docker hub\u4f7f\u7528 &#8220;docker pull [\u955c\u50cf\u540d\u79f0]&#8221; \u547d\u4ee4\u62c9\u53d6\u955c\u50cf\u53ef\u9009\uff1a\u6307\u5b9a\u955c\u50cf\u7248\u672c\u4ee5\u62c9\u53d6\u7279\u5b9a\u7248\u672c\u4f7f\u7528 &#8220;docker images&#8221; \u547d\u4ee4\u68c0\u67e5\u5df2\u62c9\u53d6\u7684\u955c\u50cf\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/05\/2024060509541976235.jpg\" class=\"aligncenter\" title=\"docker\u5bb9\u5668\u600e\u4e48\u62c9\u53d6\u955c\u50cf\u63d2\u56fe\" alt=\"docker\u5bb9\u5668\u600e\u4e48\u62c9\u53d6\u955c\u50cf\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u62c9\u53d6 Docker \u955c\u50cf<\/strong><\/p>\n<p>Docker \u955c\u50cf\u662f\u5305\u542b\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u4f9d\u8d56\u9879\u7684\u6253\u5305\u6587\u4ef6\uff0c\u662f\u521b\u5efa\u548c\u8fd0\u884c\u5bb9\u5668\u7684\u57fa\u7840\u3002\u8981\u62c9\u53d6\u955c\u50cf\uff0c\u60a8\u9700\u8981\u4f7f\u7528 Docker \u547d\u4ee4\u884c\u754c\u9762 (CLI)\u3002<\/p>\n<p><strong>\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li> <strong>\u767b\u5f55 Docker Hub\uff1a<\/strong><br \/>\u5982\u679c\u60a8\u5c1a\u672a\u767b\u5f55 Docker Hub\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a login\u3002\u8f93\u5165\u60a8\u7684 Docker ID \u548c\u5bc6\u7801\u3002<\/li>\n<li>\n<p><strong>\u62c9\u53d6\u955c\u50cf\uff1a<\/strong><br \/>\u8981\u62c9\u53d6\u955c\u50cf\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>docker pull [\u955c\u50cf\u540d\u79f0]<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u62c9\u53d6 Nginx \u955c\u50cf\uff0c\u8bf7\u6267\u884c\uff1adocker pull \u3002<\/p>\n<\/li>\n<li> <strong>\u6307\u5b9a\u955c\u50cf\u7248\u672c\uff1a<\/strong><br \/>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cDocker \u5c06\u62c9\u53d6\u6700\u65b0\u7248\u672c\u7684\u955c\u50cf\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u6807\u7b7e\u6765\u62c9\u53d6\u7279\u5b9a\u7248\u672c\uff0c\u4f8b\u5982\uff1adocker pull nginx:1.21\u3002<\/li>\n<li> <strong>\u68c0\u67e5\u955c\u50cf\uff1a<\/strong><br \/>\u8981\u67e5\u770b\u5df2\u62c9\u53d6\u7684\u955c\u50cf\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1adocker images\u3002<\/li>\n<\/ol>\n<p><strong>\u5176\u4ed6\u9009\u9879\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>\u6307\u5b9a\u955c\u50cf\u4ed3\u5e93\uff1a<\/strong><br \/> \u60a8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u955c\u50cf\u4ed3\u5e93\u6765\u62c9\u53d6\u79c1\u6709\u955c\u50cf\uff0c\u4f8b\u5982\uff1adocker pull my-registry.example.com\/my-image\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u522b\u540d\uff1a<\/strong><br \/> \u60a8\u53ef\u4ee5\u4f7f\u7528\u522b\u540d\u6765\u7b80\u5316\u62c9\u53d6\u547d\u4ee4\uff0c\u4f8b\u5982\uff1adocker pull nginx:latest \u53ef\u4ee5\u66ff\u6362\u4e3a docker pull nginx\u3002<\/li>\n<li> <strong>\u914d\u7f6e\u955c\u50cf\u52a0\u901f\u5668\uff1a<\/strong><br \/> \u5982\u679c\u60a8\u9047\u5230\u62c9\u53d6\u955c\u50cf\u7f13\u6162\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u955c\u50cf\u52a0\u901f\u5668\u6765\u63d0\u9ad8\u901f\u5ea6\u3002\u8be6\u7ec6\u914d\u7f6e\u6b65\u9aa4\u8bf7\u53c2\u8003 Docker \u6587\u6863\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5bb9\u5668\u600e\u4e48\u62c9\u53d6\u955c\u50cf\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u62c9\u53d6 docker \u955c\u50cf\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u767b\u5f55 docker hub\u4f7f\u7528 &#8220;docker pull [\u955c\u50cf\u540d\u79f0]&#8221; \u547d\u4ee4\u62c9\u53d6\u955c\u50cf\u53ef\u9009\uff1a\u6307\u5b9a\u955c\u50cf\u7248\u672c\u4ee5\u62c9\u53d6\u7279\u5b9a\u7248\u672c\u4f7f\u7528 &#8220;docker images&#8221; \u547d\u4ee4\u68c0\u67e5\u5df2\u62c9\u53d6\u7684\u955c\u50cf \u5982\u4f55\u62c9\u53d6 Docker \u955c\u50cf Docker \u955c\u50cf\u662f\u5305\u542b\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u4f9d\u8d56\u9879\u7684\u6253\u5305\u6587\u4ef6\uff0c\u662f\u521b\u5efa\u548c\u8fd0\u884c\u5bb9\u5668\u7684\u57fa\u7840\u3002\u8981\u62c9\u53d6\u955c\u50cf\uff0c\u60a8\u9700\u8981\u4f7f\u7528 Docker \u547d\u4ee4\u884c\u754c\u9762 (CLI)\u3002 \u6b65\u9aa4\uff1a \u767b\u5f55 Docker Hub\uff1a\u5982\u679c\u60a8\u5c1a\u672a\u767b\u5f55 Docker Hub\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a login\u3002\u8f93\u5165\u60a8\u7684 Docker ID \u548c\u5bc6\u7801\u3002 \u62c9\u53d6\u955c\u50cf\uff1a\u8981\u62c9\u53d6\u955c\u50cf\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a docker pull [\u955c\u50cf\u540d\u79f0] \u767b\u5f55\u540e\u590d\u5236 \u4f8b\u5982\uff0c\u8981\u62c9\u53d6 Nginx \u955c\u50cf\uff0c\u8bf7\u6267\u884c\uff1adocker pull \u3002 \u6307\u5b9a\u955c\u50cf\u7248\u672c\uff1a\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cDocker \u5c06\u62c9\u53d6\u6700\u65b0\u7248\u672c\u7684\u955c\u50cf\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u6807\u7b7e\u6765\u62c9\u53d6\u7279\u5b9a\u7248\u672c\uff0c\u4f8b\u5982\uff1adocker pull nginx:1.21\u3002 \u68c0\u67e5\u955c\u50cf\uff1a\u8981\u67e5\u770b\u5df2\u62c9\u53d6\u7684\u955c\u50cf\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1adocker images\u3002 \u5176\u4ed6\u9009\u9879\uff1a \u6307\u5b9a\u955c\u50cf\u4ed3\u5e93\uff1a \u60a8\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u955c\u50cf\u4ed3\u5e93\u6765\u62c9\u53d6\u79c1\u6709\u955c\u50cf\uff0c\u4f8b\u5982\uff1adocker pull my-registry.example.com\/my-image\u3002 \u4f7f\u7528\u522b\u540d\uff1a \u60a8\u53ef\u4ee5\u4f7f\u7528\u522b\u540d\u6765\u7b80\u5316\u62c9\u53d6\u547d\u4ee4\uff0c\u4f8b\u5982\uff1adocker pull nginx:latest [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-18309","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=18309"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18309\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}