I have a scenario where we need our private Docker Registry (v2) to not accept pushes to a tag if it already exists.
For example I have
192.168.0.77:5000/my-project:1.0.0
and someone pushes an update on the endpoint above. It should stop the push.
Then when the user pushes with tag 1.0.1 or any other, it will push successfuly.
I know Docker allows pushing on the same tag, however I wish to have this kind of workflow so we don't override each other's image this way and also these will co-relate with a Jenkins build (for transaction purposes).
Deployment Instructions (in bash)
docker login -u admin -p fakepassword 192.168.0.77:5000
docker tag my-project 192.168.0.77:5000/my-project:1.0.0
docker push 192.168.0.77:5000/my-project:1.0.0
Can someone please advice a way of achieving this?