Docker - check private registry image version

后端 未结 7 1923
抹茶落季
抹茶落季 2021-01-02 03:37

What CLI commands do I need to use in order to check if the image in my private docker registry is a newer version than the one currently running on my server?

E.g.

7条回答
  •  感动是毒
    2021-01-02 04:16

    AFAIK, this is not possible right now.

    The only thing I see would be to pull the registry to check if there is a new version of your image (would then have a different ID than your locally stored image):

    docker pull your/image:tag
    

    But yes, that would mean fetching the new images (if any).

    If you have a look at the registry API documentation, you'll see that if you don't mind scripting a bit, you could get this information without actually downloading the image, by fetching the image tags and check if the returned ID for the tag matches the ID of the local image you have with the same tag.

    That being said, having something to "check for updates" integrated into the docker CLI would be a nice addition.

提交回复
热议问题