How to get a list of images on docker registry v2

前端 未结 16 1825
孤城傲影
孤城傲影 2020-12-02 04:04

I\'m using docker registry v1 and I\'m interested in migrating to the newer version, v2. But I need some way to get a list of images present on registry; for example with re

16条回答
  •  广开言路
    2020-12-02 04:37

    I had to do the same here and the above works except I had to provide login details as it was a local docker repository.

    It is as per the above but with supplying the username/password in the URL.

    curl -k -X GET https://yourusername:yourpassword@theregistryURL/v2/_catalog
    

    It comes back as unformatted JSON.

    I piped it through the python formatter for ease of human reading, in case you would like to have it in this format.

    curl -k -X GET https://yourusername:yourpassword@theregistryURL/v2/_catalog | python -m json.tool
    

提交回复
热议问题