How can I list all tags for a Docker image on a remote registry?

前端 未结 19 1994
时光取名叫无心
时光取名叫无心 2020-12-04 04:46

How can I list all tags of a Docker image on a remote Docker registry using the CLI (preferred) or curl?

Preferably without pulling all versions from the remote regi

19条回答
  •  生来不讨喜
    2020-12-04 05:12

    Building on Yan Foto's answer (the v2 api), I created a simple Python script to list the tags for a given image.

    Usage:

    ./docker-registry-list.py alpine
    

    Output:

    {
      "name": "library/alpine",
      "tags": [
        "2.6",
        "2.7",
        "3.1",
        "3.2",
        "3.3",
        "3.4",
        "3.5",
        "3.6",
        "3.7",
        "edge",
        "latest"
      ]
    }
    

提交回复
热议问题