{"id":80699,"date":"2023-10-08T14:31:10","date_gmt":"2023-10-08T06:31:10","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=80699"},"modified":"2023-10-08T14:31:10","modified_gmt":"2023-10-08T06:31:10","slug":"know-docker-index","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/know-docker-index.html","title":{"rendered":"\u77e5\u9053\u4ec0\u4e48\u662fdocker index\u670d\u52a1\u5c31\u770b\u8fd9\u91cc\u3002"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nindex\u987e\u540d\u601d\u4e49\u201c\u7d22\u5f15\u201d\uff0cindex\u670d\u52a1\u4e3b\u8981\u63d0\u4f9b\u955c\u50cf\u7d22\u5f15\u4ee5\u53ca\u7528\u6237\u8ba4\u8bc1\u7684\u529f\u80fd\u3002\u5f53\u4e0b\u8f7d\u4e00\u4e2a\u955c\u50cf\u7684\u65f6\u5019\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u9996\u5148\u4f1a\u53bbindex\u670d\u52a1\u4e0a \u505a\u8ba4\u8bc1\uff0c\u7136\u540e\u67e5\u627e\u955c\u50cf\u6240\u5728\u7684registry\u7684\u5730\u5740\u5e76\u653e\u56de\u7ed9docker\u5ba2\u6237\u7aef\uff0c\u6700\u7ec8docker\u5ba2\u6237\u7aef\u518d\u4eceregistry\u4e0b\u8f7d\u955c\u50cf\uff0c\u5f53\u7136\u5728\u4e0b\u8f7d\u8fc7\u7a0b\u4e2d registry\u4f1a\u53bbindex\u6821\u9a8c\u5ba2\u6237\u7aeftoken\u7684\u5408\u6cd5\u6027\u3002\u4e0d\u540c\u955c\u50cf\u53ef\u4ee5\u4fdd\u5b58\u5728\u4e0d\u540c\u7684registry\u670d\u52a1\u4e0a\uff0c\u5176\u7d22\u5f15\u4fe1\u606f\u90fd\u653e\u5728index\u670d\u52a1\u4e0a\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\ndocker\u4ed3\u5e93 \u7684\u5b9e\u73b0\uff0c\u6709\u4e24\u79cd\u8fd0\u884c\u6a21\u5f0f
\n\uff081\uff09standalone=true\uff1a\u5728\u8fd9\u79cd\u6a21\u5f0f\u4e0b\uff0c\u4ed3\u5e93\u81ea\u8eab\u63d0\u4f9b\u4e86\u7b80\u5355\u7684index\u670d\u52a1\uff0c\u5728\u5b9e\u73b0\u8fc7\u7a0b\u4e2dindex\u53ea\u662f\u5b9e\u73b0\u4e86\u7b80\u5355\u7684\u7d22\u5f15\u529f\u80fd\uff0c\u6ca1\u6709\u5b9e\u73b0\u7528\u6237\u8ba4\u8bc1\u529f\u80fd
\n\uff082\uff09standalone=false\uff1a\u5728\u8fd9\u79cd\u6a21\u5f0f\u4e0b\uff0c\u9700\u8981\u914d\u7f6eindex\u7684\u670d\u52a1\u8bbf\u95ee\u70b9\uff0c\u9700\u81ea\u884c\u5b9e\u73b0index\u670d\u52a1<\/p>\n

index\u670d\u52a1\u5bf9\u5916\u63d0\u4f9b\u7684\u63a5\u53e3<\/strong><\/div>\n

\nindex\u5bf9\u5916\u63d0\u4f9b\u7684REST API\u63a5\u53e3\u5982\u4e0b\uff1a<\/p>\n

PUT \/v1\/repositories\/(namespace)\/(repo_name)\/<\/pre>\n

\u5728docker push\u7684\u6d41\u7a0b\u4e2d\u4f1a\u8c03\u7528\u5230\uff0c\u5176\u4f5c\u7528\u662f\u521b\u5efa\u4e00\u4e2arepository\u3002\u521b\u5efa\u4e4b\u524d\u4f1a\u5bf9\u7528\u6237\u5bc6\u7801\u4ee5\u53ca\u6743\u9650\u8fdb\u884c\u9a8c\u8bc1\uff0c\u5982\u679c\u5408\u6cd5\uff0c\u5219\u6700\u7ec8\u4f1a\u8fd4\u56de\u4e00\u4e2atoken\u81f3docker\u5ba2\u6237\u7aef<\/p>\n

DELETE \/v1\/repositories\/(namespace)\/(repo_name)\/<\/pre>\n

\u5220\u9664\u4e00\u4e2arepository\uff0c\u5220\u9664\u4e4b\u524d\u4f1a\u5bf9\u7528\u6237\u5bc6\u7801\u4ee5\u53ca\u6743\u9650\u8fdb\u884c\u9a8c<\/p>\n

PUT \/v1\/repositories\/(namespace)\/(repo_name)\/images<\/pre>\n

\u5728docker push\u6d41\u7a0b\u4e2d\u4f1a\u8c03\u7528\u5230\uff0c\u5176\u4f5c\u7528\u662f\u66f4\u65b0repository\u5bf9\u5e94\u7684image\u5217\u8868\uff0c\u66f4\u65b0\u4e4b\u524d\u4f1a\u6821\u9a8c\u643a\u5e26\u7684token<\/p>\n

GET \/v1\/repositories\/(namespace)\/(repo_name)\/images<\/pre>\n

\u5728docker pull\u6d41\u7a0b\u4e2d\u4f1a\u8c03\u7528\u5230\uff0c\u5176\u4f5c\u7528\u662f\u83b7\u53d6repository\u5bf9\u5e94\u7684image\u5217\u8868\u3002\u83b7\u53d6\u4e4b\u524d\u4f1a\u5bf9\u7528\u6237\u5bc6\u7801\u4ee5\u53ca\u6743\u9650\u8fdb\u884c\u9a8c\u8bc1<\/p>\n

PUT \/v1\/repositories\/(namespace)\/(repo_name)\/auth<\/pre>\n

\u6821\u9a8ctoken\u7684\u5408\u6cd5\u6027<\/p>\n

GET \/v1\/users\/<\/pre>\n

docker login\u4f1a\u8c03\u7528\u5230\u6b64\u63a5\u53e3\uff0c\u7528\u6765\u9a8c\u8bc1\u7528\u6237\u7684\u5408\u6cd5\u6027<\/p>\n

POST \/v1\/users\/<\/pre>\n

docker login\u4f1a\u8c03\u7528\u5230\u6b64\u63a5\u53e3\uff0c\u53ef\u7528\u6765\u521b\u5efa\u4e00\u4e2a\u7528\u6237<\/p>\n

PUT \/v1\/users\/username\/<\/pre>\n

\u7528\u6765\u66f4\u65b0\u7528\u6237\u4fe1\u606f
\n\u5404\u4e2a\u63a5\u53e3\u7684\u8bf7\u6c42\u7684\u5177\u4f53Header\u3001Action\u3001Response\uff0c\u53ef\u53c2\u8003 \u8fd9\u91cc(https:\/\/docs.docker.com\/reference\/api\/docker-io_api\/)<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-5037-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/know-docker-index.html<\/a>\u7f16\u8f91\uff1a\u5f20@\u5b87\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb index\u987e\u540d\u601d\u4e49\u201c\u7d22\u5f15\u201d\uff0cindex\u670d\u52a1\u4e3b\u8981\u63d0\u4f9b\u955c\u50cf\u7d22\u5f15\u4ee5\u53ca\u7528\u6237\u8ba4\u8bc1\u7684\u529f\u80fd\u3002\u5f53\u4e0b\u8f7d\u4e00\u4e2a\u955c\u50cf\u7684\u65f6\u5019\uff0c\u5982\u4e0b […]<\/p>\n","protected":false},"author":310,"featured_media":80702,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-80699","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/80699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=80699"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/80699\/revisions"}],"predecessor-version":[{"id":284752,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/80699\/revisions\/284752"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/80702"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=80699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=80699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=80699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}