{"id":12233,"date":"2023-06-27T11:38:56","date_gmt":"2023-06-27T03:38:56","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=12233"},"modified":"2023-06-27T13:46:31","modified_gmt":"2023-06-27T05:46:31","slug":"docker-images-%e5%91%bd%e4%bb%a4%e5%90%84%e5%8f%82%e6%95%b0%e8%af%a6%e8%a7%a3%e5%92%8c%e4%bd%bf%e7%94%a8%e6%a0%b7%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/12233","title":{"rendered":"Docker images \u547d\u4ee4\u5404\u53c2\u6570\u8be6\u89e3\u548c\u4f7f\u7528\u6837\u4f8b"},"content":{"rendered":"\n<p>\u672c\u6587\u8bb0\u5f55\u5728\u5b66\u4e60\u548c\u4f7f\u7528docker\u8fc7\u7a0b\u4e2d\uff0c\u5e38\u7528\u7684docker images \u547d\u4ee4\u5404\u4e2a\u53c2\u6570\u7684\u542b\u4e49\u548c\u4f7f\u7528\u6837\u4f8b\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u5f55\u5bfc\u822a<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b0cb56aec7\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b0cb56aec7\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E5%8F%82%E8%80%83\" >\u53c2\u8003<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#docker_images\" >docker images<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E5%8F%82%E6%95%B0\" >\u53c2\u6570<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E5%8F%AF%E9%80%89%E5%8F%82%E6%95%B0_%E9%95%9C%E5%83%8F%E4%BB%93%E5%BA%93%E5%90%8D%E5%AD%97%EF%BC%9AREPOSITORY\" >\u53ef\u9009\u53c2\u6570:\u955c\u50cf\u4ed3\u5e93\u540d\u5b57\uff1aREPOSITORY<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E5%8F%AF%E9%80%89%E5%8F%82%E6%95%B0_%E9%95%9C%E5%83%8F%E4%BB%93%E5%BA%93%E5%90%8D%E5%AD%97%E5%92%8C%E7%89%88%E6%9C%ACTAG\" >\u53ef\u9009\u53c2\u6570:\u955c\u50cf\u4ed3\u5e93\u540d\u5b57\u548c\u7248\u672cTAG<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E2%80%93digests\" >&#8211;digests<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E2%80%93filter_-f\" >&#8211;filter \/ -f<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#dangling\" >dangling<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#label\" >label<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E6%8C%89label%E5%90%8D%E5%AD%97%E8%BF%87%E6%BB%A4\" >\u6309label\u540d\u5b57\u8fc7\u6ee4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E6%8C%89label%E7%9A%84%E5%90%8D%E5%AD%97%E5%92%8C%E5%80%BC%E8%BF%87%E6%BB%A4\" >\u6309label\u7684\u540d\u5b57\u548c\u503c\u8fc7\u6ee4<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#before\" >before<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#since\" >since<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#reference\" >reference<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E2%80%93format\" >&#8211;format<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E8%BE%93%E5%87%BA%E6%8C%87%E5%AE%9A%E5%86%85%E5%AE%B9\" >\u8f93\u51fa\u6307\u5b9a\u5185\u5bb9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E4%BB%A5%E8%A1%A8%E6%A0%BC%E6%A0%BC%E5%BC%8F%E8%BE%93%E5%87%BA%E6%8C%87%E5%AE%9A%E5%86%85%E5%AE%B9\" >\u4ee5\u8868\u683c\u683c\u5f0f\u8f93\u51fa\u6307\u5b9a\u5185\u5bb9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E4%BB%A5JSON%E6%A0%BC%E5%BC%8F%E8%BE%93%E5%87%BA\" >\u4ee5JSON\u683c\u5f0f\u8f93\u51fa<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#%E2%80%93no-trunc\" >&#8211;no-trunc<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.gbase8.cn\/en\/12233\/#-q\" >-q<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83\"><\/span>\u53c2\u8003<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.gbase8.cn\/12303\">Docker\u547d\u4ee4\u53c2\u6570\u8be6\u89e3\u548c\u4f7f\u7528\u6837\u4f8b\u6587\u7ae0\u6c47\u603b<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/images\/\">https:\/\/docs.docker.com\/engine\/reference\/commandline\/images\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"docker_images\"><\/span>docker images<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E6%95%B0\"><\/span>\u53c2\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 ~]# docker images --help\n\nUsage:  docker images &#91;OPTIONS] &#91;REPOSITORY&#91;:TAG]]\n\nList images\n\nAliases:\n  docker image ls, docker image list, docker images\n\nOptions:\n  -a, --all             Show all images (default hides intermediate images)\n      --digests         Show digests\n  -f, --filter filter   Filter output based on conditions provided\n      --format string   Format output using a custom template:\n                        'table':            Print output in table format with column headers (default)\n                        'table TEMPLATE':   Print output in table format using the given Go template\n                        'json':             Print in JSON format\n                        'TEMPLATE':         Print output using the given Go template.\n                        Refer to https:\/\/docs.docker.com\/go\/formatting\/ for more information about formatting output with templates\n      --no-trunc        Don't truncate output\n  -q, --quiet           Only show image IDs\n&#91;root@vm249 ~]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%AF%E9%80%89%E5%8F%82%E6%95%B0_%E9%95%9C%E5%83%8F%E4%BB%93%E5%BA%93%E5%90%8D%E5%AD%97%EF%BC%9AREPOSITORY\"><\/span>\u53ef\u9009\u53c2\u6570:\u955c\u50cf\u4ed3\u5e93\u540d\u5b57\uff1aREPOSITORY<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5982\u679c\u6709\u591a\u4e2a\u7248\u672cTAG\uff0c\u4f1a\u5168\u90e8\u5217\u51fa\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 ~]# docker images goharbor\/harbor-core\nREPOSITORY             TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/harbor-core   v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\n&#91;root@vm249 ~]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%AF%E9%80%89%E5%8F%82%E6%95%B0_%E9%95%9C%E5%83%8F%E4%BB%93%E5%BA%93%E5%90%8D%E5%AD%97%E5%92%8C%E7%89%88%E6%9C%ACTAG\"><\/span>\u53ef\u9009\u53c2\u6570:\u955c\u50cf\u4ed3\u5e93\u540d\u5b57\u548c\u7248\u672cTAG<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 ~]# docker images goharbor\/harbor-core:v2.8.2\nREPOSITORY             TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/harbor-core   v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\n&#91;root@vm249 ~]#\n<\/code><\/pre>\n\n\n\n<p>\u9ed8\u8ba4docker images<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 harbor]# docker images\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    5126635ae9f0   3 weeks ago   174MB\ngoharbor\/prepare              v2.8.2    eb3cf3cdd17a   3 weeks ago   163MB\n&#91;root@vm249 harbor]#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">--digests<\/h2>\n\n\n\n<p>\u589e\u52a0\u4e86\u6570\u5b57\u6458\u8981\u7684\u8f93\u51fa\u3002\u8bf7\u6ce8\u610f\uff0c\u5176\u4e0eimage ID\u662f\u4e24\u4e2a\u5185\u5bb9\u3002\u6458\u8981\u662f\u4e3a\u4e86\u9a8c\u8bc1\u6587\u4ef6\u6ca1\u6709\u88ab\u4fee\u6539\u8fc7\uff0c\u6765\u81ea\u4e8e\u955c\u50cf\u63d0\u4f9b\u8005\u3002image id\u662f\u7531docker\u5728\u955c\u50cf\u8f7d\u5165\u65f6(load\/pull)\uff0c\u751f\u6210\u7684\u4e00\u4e2a\u5185\u90e8\u7f16\u53f7\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 ~]# docker images -a --digests\nREPOSITORY                    TAG       DIGEST                                                                    IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    sha256:221d7509e59932773682a61d8e49502dd27a5b30ea6c870f18d31cf4d171be4f   6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    sha256:e7b4b83c44c86a29a1ed65fed200e6e8b704224e1d8b4443342ba1c87b676cd0   fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    sha256:0883d973994970336e6fb187e342b874aa86964665c8f77c905f90c97b85b11a   f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    sha256:a4230005f1d124757605259ae3bbcd957cb84dba721a07c7d63da5b9645f74f6   3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    sha256:ca1d5354d9101502fb44d0b85e05784e91f9b6f25111da4141436986a72fc6e3   2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    sha256:4bc04166c3e42abdfbe30a2693f26316416e75aae6a91eb619c719f0e023fdcf   40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    sha256:654efa193924544a680f1cc7aaadb8d9fb4e1dcaa8c84a74c71b7fe861973838   0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    sha256:945351a420f25d4a45a0918813c783f588eda44df1c45bbfb25cdf7ce5b18e78   3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    sha256:6e232426eb600297f7a2df3c048ae7ea055e44042c2c1dfd7c369d14d5b13873   5126635ae9f0   3 weeks ago   174MB\ngoharbor\/prepare              v2.8.2    sha256:72252d93c32f774567400834b95e5446706106ff51efac2a20523238617d760d   eb3cf3cdd17a   3 weeks ago   163MB\n&#91;root@vm249 ~]#\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1255\" height=\"419\" src=\"https:\/\/www.gbase8.cn\/wp-content\/uploads\/2023\/06\/1687837717398.png\" alt=\"\" class=\"wp-image-12287\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">--filter \/ -f <\/h2>\n\n\n\n<p>\u8fd4\u56de\u7b26\u5408\u8fc7\u6ee4\u6761\u4ef6\u7684\u955c\u50cf\u4fe1\u606f<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>dangling&nbsp; \u662f\u5426\u6709TAG<\/li><li>label \u6807\u7b7e\u8fc7\u6ee4\uff0c<code>label=&lt;key&gt;<\/code>&nbsp;\u6216\u8005&nbsp;<code>label=&lt;key&gt;=&lt;value&gt;<\/code><\/li><li>before (<code>&lt;image-name&gt;[:&lt;tag&gt;]<\/code>,&nbsp;<code>&lt;image id&gt;<\/code>&nbsp;or&nbsp;<code>&lt;image@digest&gt;<\/code>) - \u6307\u5b9aid\u4e4b\u524d\u521b\u5efa\u7684\u955c\u50cf<\/li><li>reference (\u955c\u50cf\u6b63\u5219\u5339\u914d)<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"dangling\"><\/span>dangling<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u6ca1\u6709TAG\u7684\u7b49\u4e8edangling=true<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 ~]# docker images -f dangling=true\nREPOSITORY   TAG       IMAGE ID   CREATED   SIZE\n&#91;root@vm249 ~]#\n&#91;root@vm249 ~]# docker images -f dangling=false\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    5126635ae9f0   3 weeks ago   174MB\ngoharbor\/prepare              v2.8.2    eb3cf3cdd17a   3 weeks ago   163MB\n&#91;root@vm249 ~]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"label\"><\/span>label<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u53ef\u4ee5\u8fc7\u6ee4\u5e26\u67d0\u4e2a\u6807\u7b7e\uff0c\u6216\u8005\u8fc7\u6ee4\u5e26\u67d0\u4e2a\u6807\u7b7e\u4e14\u6807\u7b7e\u7b49\u4e8e\u6307\u5b9a\u6570\u503c\u3002<\/p>\n\n\n\n<p>\u67e5\u770b\u955c\u50cf\u7684label,\u53ef\u4ee5\u7528docker image inspect\u547d\u4ee4\uff0c\u8f93\u51fa\u4e2d\u7684lables\u5305\u542b\u4e86lable\u7684\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>docker image inspect goharbor\/harbor-core:v2.8.2<\/code><\/pre>\n\n\n\n<p>\u8f93\u51fa\u7684Lables\u90e8\u5206\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>            \"Labels\": {\n                \"base-build-date\": \"20230531\",\n                \"build-date\": \"20230522\",\n                \"name\": \"Photon OS x86_64\/4.0 Base Image\",\n                \"vendor\": \"VMware\"\n            }\n<\/code><\/pre>\n\n\n\n<p>\u4e5f\u53ef\u4ee5\u76f4\u63a5\u8f93\u51falables\u90e8\u5206<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker image inspect goharbor\/harbor-core:v2.8.2 --format='{{json .ContainerConfig.Labels}}'\n{\"base-build-date\":\"20230531\",\"build-date\":\"20230522\",\"name\":\"Photon OS x86_64\/4.0 Base Image\",\"vendor\":\"VMware\"}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%8C%89label%E5%90%8D%E5%AD%97%E8%BF%87%E6%BB%A4\"><\/span>\u6309label\u540d\u5b57\u8fc7\u6ee4<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images -f label=name\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    5126635ae9f0   3 weeks ago   174MB\ngoharbor\/prepare              v2.8.2    eb3cf3cdd17a   3 weeks ago   163MB\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%8C%89label%E7%9A%84%E5%90%8D%E5%AD%97%E5%92%8C%E5%80%BC%E8%BF%87%E6%BB%A4\"><\/span>\u6309label\u7684\u540d\u5b57\u548c\u503c\u8fc7\u6ee4<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images -f label=name=\"Photon OS x86_64\/4.0 Base Image\"\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    5126635ae9f0   3 weeks ago   174MB\ngoharbor\/prepare              v2.8.2    eb3cf3cdd17a   3 weeks ago   163MB\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"before\"><\/span>before<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5728\u6307\u5b9aimage\u4e4b\u524d\u521b\u5efa\u7684\u955c\u50cf<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images  --filter=before=goharbor\/redis-photon:v2.8.2\nREPOSITORY                        TAG         IMAGE ID       CREATED        SIZE\ngoharbor\/harbor-registryctl       v2.8.2      fa61a236a6d6   3 weeks ago    142MB\ngoharbor\/registry-photon          v2.8.2      f80e71363231   3 weeks ago    79.3MB\ngoharbor\/nginx-photon             v2.8.2      3d009028f260   3 weeks ago    120MB\ngoharbor\/harbor-log               v2.8.2      2914d282d9bf   3 weeks ago    127MB\ngoharbor\/harbor-jobservice        v2.8.2      40118f1568a8   3 weeks ago    141MB\ngoharbor\/harbor-core              v2.8.2      0bbbd1f379fc   3 weeks ago    165MB\ngoharbor\/harbor-portal            v2.8.2      3e74e0758aa4   3 weeks ago    127MB\ngoharbor\/harbor-db                v2.8.2      5126635ae9f0   3 weeks ago    174MB\ngoharbor\/prepare                  v2.8.2      eb3cf3cdd17a   3 weeks ago    163MB\n192.168.8.84\/gcdw\/gcdw-operator   9.8.0.4.1   ee81cf4b37cc   3 months ago   247MB\n&#91;root@vm249 9.8.0.4.1]#\n\n&#91;root@vm249 9.8.0.4.1]# docker images --filter=before=goharbor\/prepare:v2.8.2\nREPOSITORY                        TAG         IMAGE ID       CREATED        SIZE\n192.168.8.84\/gcdw\/gcdw-operator   9.8.0.4.1   ee81cf4b37cc   3 months ago   247MB\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"since\"><\/span>since<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5728\u6307\u5b9aID\u4e4b\u540e\u521b\u5efa\u7684\u955c\u50cf\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --filter=since=goharbor\/prepare:v2.8.2\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    5126635ae9f0   3 weeks ago   174MB\n&#91;root@vm249 9.8.0.4.1]# docker images --filter=since=goharbor\/harbor-registryctl:v2.8.2\nREPOSITORY              TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon   v2.8.2    6f4498a430ca   3 weeks ago   121MB\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u7528imagesid<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --filter=since=5126635ae9f0\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\n&#91;root@vm249 9.8.0.4.1]#\n\n&#91;root@vm249 9.8.0.4.1]# docker images --filter=since=fa61a236a6d6\nREPOSITORY              TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon   v2.8.2    6f4498a430ca   3 weeks ago   121MB\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"reference\"><\/span>reference<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u5bf9\u955c\u50cf\u540d\u5b57\u8fdb\u884c\u6b63\u5219\u8fc7\u6ee4\u3002 \u4e0d\u5305\u62ec\u955c\u50cf\u8def\u5f84\uff0c\u53ea\u6709\u540d\u5b57\u3002\u6b63\u5219\u5305\u62ectag\u90e8\u5206\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --filter reference='goharbor\/*:v2.8.2'\nREPOSITORY                    TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/redis-photon         v2.8.2    6f4498a430ca   3 weeks ago   121MB\ngoharbor\/harbor-registryctl   v2.8.2    fa61a236a6d6   3 weeks ago   142MB\ngoharbor\/registry-photon      v2.8.2    f80e71363231   3 weeks ago   79.3MB\ngoharbor\/nginx-photon         v2.8.2    3d009028f260   3 weeks ago   120MB\ngoharbor\/harbor-log           v2.8.2    2914d282d9bf   3 weeks ago   127MB\ngoharbor\/harbor-jobservice    v2.8.2    40118f1568a8   3 weeks ago   141MB\ngoharbor\/harbor-core          v2.8.2    0bbbd1f379fc   3 weeks ago   165MB\ngoharbor\/harbor-portal        v2.8.2    3e74e0758aa4   3 weeks ago   127MB\ngoharbor\/harbor-db            v2.8.2    5126635ae9f0   3 weeks ago   174MB\ngoharbor\/prepare              v2.8.2    eb3cf3cdd17a   3 weeks ago   163MB\n&#91;root@vm249 9.8.0.4.1]# docker images --filter reference='goharbor\/*db*:v2.8.2'\nREPOSITORY           TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/harbor-db   v2.8.2    5126635ae9f0   3 weeks ago   174MB\n&#91;root@vm249 9.8.0.4.1]#\n&#91;root@vm249 9.8.0.4.1]# docker images --filter reference='goharbor\/*db*:v*'\nREPOSITORY           TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/harbor-db   v2.8.2    5126635ae9f0   3 weeks ago   174MB\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">--format<\/h2>\n\n\n\n<p>\u683c\u5f0f\u5316\u8f93\u51fa<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Placeholder<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>.ID<\/code><\/td><td>Image ID \u955c\u50cfID<\/td><\/tr><tr><td><code>.Repository<\/code><\/td><td>Image repository \u955c\u50cf\u5b58\u653e\u5904<\/td><\/tr><tr><td><code>.Tag<\/code><\/td><td>Image tag \u955c\u50cf\u7684\u6807\u7b7e<\/td><\/tr><tr><td><code>.Digest<\/code><\/td><td>Image digest \u955c\u50cf\u7684\u6570\u5b57\u7b7e\u540d<\/td><\/tr><tr><td><code>.CreatedSince<\/code><\/td><td>Elapsed time since the image was created \u955c\u50cf\u521b\u5efa\u540e\u5df2\u7ecf\u8fc7\u53bb\u7684\u65f6\u95f4<\/td><\/tr><tr><td><code>.CreatedAt<\/code><\/td><td>Time when the image was created \u955c\u50cf\u521b\u5efa\u65f6\u95f4<\/td><\/tr><tr><td><code>.Size<\/code><\/td><td>Image disk size \u955c\u50cf\u5927\u5c0f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%BE%93%E5%87%BA%E6%8C%87%E5%AE%9A%E5%86%85%E5%AE%B9\"><\/span>\u8f93\u51fa\u6307\u5b9a\u5185\u5bb9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u8f93\u51fa\u6ca1\u95ee\u9898\uff0c\u7a7a\u683c\u5206\u5272<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --format \"{{.Repository}} {{.ID}}\"\ngoharbor\/redis-photon 6f4498a430ca\ngoharbor\/harbor-registryctl fa61a236a6d6\ngoharbor\/registry-photon f80e71363231\ngoharbor\/nginx-photon 3d009028f260\ngoharbor\/harbor-log 2914d282d9bf\ngoharbor\/harbor-jobservice 40118f1568a8\ngoharbor\/harbor-core 0bbbd1f379fc\ngoharbor\/harbor-portal 3e74e0758aa4\ngoharbor\/harbor-db 5126635ae9f0\ngoharbor\/prepare eb3cf3cdd17a\n192.168.8.84\/gcdw\/gcdw-operator ee81cf4b37cc\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<p>\u7528TAB\u5206\u5272\u3002\u56e0\u4e3a\u5b58\u653e<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --format \"{{.Repository}}\\t{{.ID}}\"\ngoharbor\/redis-photon   6f4498a430ca\ngoharbor\/harbor-registryctl     fa61a236a6d6\ngoharbor\/registry-photon        f80e71363231\ngoharbor\/nginx-photon   3d009028f260\ngoharbor\/harbor-log     2914d282d9bf\ngoharbor\/harbor-jobservice      40118f1568a8\ngoharbor\/harbor-core    0bbbd1f379fc\ngoharbor\/harbor-portal  3e74e0758aa4\ngoharbor\/harbor-db      5126635ae9f0\ngoharbor\/prepare        eb3cf3cdd17a\n192.168.8.84\/gcdw\/gcdw-operator ee81cf4b37cc\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BB%A5%E8%A1%A8%E6%A0%BC%E6%A0%BC%E5%BC%8F%E8%BE%93%E5%87%BA%E6%8C%87%E5%AE%9A%E5%86%85%E5%AE%B9\"><\/span>\u4ee5\u8868\u683c\u683c\u5f0f\u8f93\u51fa\u6307\u5b9a\u5185\u5bb9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u589e\u52a0table\u683c\u5f0f\uff0c\u5b57\u6bb5\u4e4b\u95f4\u7528TAB\u5206\u5272<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --format \"table {{.Repository}}\\t{{.ID}}\"\nREPOSITORY                        IMAGE ID\ngoharbor\/redis-photon             6f4498a430ca\ngoharbor\/harbor-registryctl       fa61a236a6d6\ngoharbor\/registry-photon          f80e71363231\ngoharbor\/nginx-photon             3d009028f260\ngoharbor\/harbor-log               2914d282d9bf\ngoharbor\/harbor-jobservice        40118f1568a8\ngoharbor\/harbor-core              0bbbd1f379fc\ngoharbor\/harbor-portal            3e74e0758aa4\ngoharbor\/harbor-db                5126635ae9f0\ngoharbor\/prepare                  eb3cf3cdd17a\n192.168.8.84\/gcdw\/gcdw-operator   ee81cf4b37cc\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BB%A5JSON%E6%A0%BC%E5%BC%8F%E8%BE%93%E5%87%BA\"><\/span>\u4ee5JSON\u683c\u5f0f\u8f93\u51fa<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images --filter reference='goharbor\/*db*:v*'\nREPOSITORY           TAG       IMAGE ID       CREATED       SIZE\ngoharbor\/harbor-db   v2.8.2    5126635ae9f0   3 weeks ago   174MB\n&#91;root@vm249 9.8.0.4.1]# docker images --filter reference='goharbor\/*db*:v*' --format json\n{\"Containers\":\"N\/A\",\"CreatedAt\":\"2023-06-02 04:33:44 -0700 PDT\",\"CreatedSince\":\"3 weeks ago\",\"Digest\":\"\\u003cnone\\u003e\",\"ID\":\"5126635ae9f0\",\"Repository\":\"goharbor\/harbor-db\",\"SharedSize\":\"N\/A\",\"Size\":\"174MB\",\"Tag\":\"v2.8.2\",\"UniqueSize\":\"N\/A\",\"VirtualSize\":\"173.9MB\"}\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">--no-trunc<\/h2>\n\n\n\n<p>\u663e\u793a\u5b8c\u6574\u7684\u955c\u50cfID,\u4e0d\u622a\u65ad\u6210\u524d12\u4f4d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1136\" height=\"413\" src=\"https:\/\/www.gbase8.cn\/wp-content\/uploads\/2023\/06\/1687837540257.png\" alt=\"\" class=\"wp-image-12284\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"-q\"><\/span>-q<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u53ea\u8f93\u51faimages\u7684ID\u3002\u8fd9\u4e2a\u591a\u7528\u4e8e\u6279\u91cf\u5904\u7406\uff0c\u6bd4\u5982\u5220\u9664\u955c\u50cf\uff08docker rmi )<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;root@vm249 9.8.0.4.1]# docker images -q\n6f4498a430ca\nfa61a236a6d6\nf80e71363231\n3d009028f260\n2914d282d9bf\n40118f1568a8\n0bbbd1f379fc\n3e74e0758aa4\n5126635ae9f0\neb3cf3cdd17a\nee81cf4b37cc\n&#91;root@vm249 9.8.0.4.1]#\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u8bb0\u5f55\u5728\u5b66\u4e60\u548c\u4f7f\u7528docker\u8fc7\u7a0b\u4e2d\uff0c\u5e38\u7528\u7684docker images \u547d\u4ee4\u5404\u4e2a\u53c2\u6570\u7684\u542b\u4e49\u548c\u4f7f\u7528\u6837\u4f8b\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[120],"class_list":["post-12233","post","type-post","status-publish","format-standard","hentry","category-1","tag-docker"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/12233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=12233"}],"version-history":[{"count":59,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/12233\/revisions"}],"predecessor-version":[{"id":12306,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/12233\/revisions\/12306"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=12233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=12233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=12233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}