Answers: <p>It is possible to prevent the overwrite of tags by listing the existing tags using <a href="https://github.com/jessfraz/reg" rel="nofollow noreferrer">https://github.com/jessfraz/reg</a> and exit the pipeline if there is a duplicate.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-07-25T09:40:46.930Z
Answers: 2017-07-25T17:44:34.867Z
Answers: 2017-07-25T17:44:34.867Z
Answers: 030
Body: <p>This is a follow-up to <a href="https://stackoverflow.com/q/31605661/2777965">this question</a> about preventing tag overwrite in docker hub.</p>
  
  <p>When one pushes a tag to a private docker registry and the current tag exists then it will be overwritten. How to prevent this?</p>
  
  <p>I have considered using a digest and other solutions, but this does not guarantee overwrites as one is still able to tag an image using a certain digest. I really would like to see an error and an exit code of 2.</p>
  
Tags: <docker>
Title: How to prevent that tags will be overwritten in docker private registries?
UserDisplayName: 030
ThreadText: # How to prevent that tags will be overwritten in docker private registries?
  
  (Asked by: username_0 on 2017-07-17)
  
  This is a follow-up to [this question](https://stackoverflow.com/q/31605661/2777965) about preventing tag overwrite in docker hub.
  
  When one pushes a tag to a private docker registry and the current tag exists then it will be overwritten. How to prevent this?
  
  I have considered using a digest and other solutions, but this does not guarantee overwrites as one is still able to tag an image using a certain digest. I really would like to see an error and an exit code of 2.
  
  **Tags:** docker
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-07-25. Score: 3 | Accepted answer
  
  It is possible to prevent the overwrite of tags by listing the existing tags using <https://github.com/jessfraz/reg> and exit the pipeline if there is a duplicate.
  
  
  ---
  
  