How to prevent overwriting docker images on a docker hub?

Is there a way to prevent images from loading into the docker hub with the same tags as existing images? Our precedent is as follows.

We are deploying for production with a docker layout file with image tags as version numbers. In order to maintain feedback from previous environments and idempotent deployment, it is necessary that a specific labeled docker image always refer to the same image.

However, the docker hub allows you to upload images with the same tags as existing images (they override the old image). This completely violates the idea of ​​versions of your images.

We are currently working with our build scripts, pulling out all versions of the image and looking through tags to verify that overwriting will not happen, etc., but it seems like there should be a better way.

If the docker hub does not support this, is there a way to do a docker deployment without a dock?

+4
source share
2 answers

Assuming you have a local build system for creating Docker images: you can include the build number from your local create job in your tag. In doing so, you confirm your claim:

... it is imperative that a specific tagged docker image always refers to the same image.

, , .

+2

; , ( h3nrik - ).

. v2 , . , . , , , .

:

docker pull debian@sha256:f43366bc755696485050ce14e1429c481b6f0ca04505c4a3093dfdb4fafb899e

, docker push.

, , , , , .

, , , , Notary . , , git .

+5

Source: https://habr.com/ru/post/1599464/


All Articles