Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker registry remove tags #386

Closed
ghost opened this issue Jan 22, 2019 · 2 comments
Closed

docker registry remove tags #386

ghost opened this issue Jan 22, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 22, 2019

I have your docker registry running.
I have successfully pushed some images with different tags.
Accidentally I mistyped a tag and push that image.
Question: how can I remove this mistyped tags from the registry? I only want to remove the tag, not the image files.

Found some tips in https://stackoverflow.com/questions/25436742/how-to-delete-images-from-a-private-docker-registry and docker-archive/docker-registry#988 and https://serverfault.com/questions/750094/remove-tagged-docker-image-from-private-registry and converted curl to invoke-webrequest:
Working:
Invoke-WebRequest -Method Get -Uri https://dockerregistry.is.cosinus/v2/businesscentral/onprem/tags/list
Invoke-WebRequest -Method Get -Uri https://dockerregistry.is.cosinus/v2/businesscentral/onprem/manifests/de
From the last one I got the Docker-Content-Digest for the following:
Invoke-WebRequest -Method Delete -Uri https://dockerregistry.is.cosinus/v2/businesscentral/onprem/manifests/sha256:5d56bf354da17e81fae59171a0c11fdec06f94645bcc0bde8467e750670f6478
Invoke-WebRequest -Method Delete -Headers @{"Accept" = "application/vnd.docker.distribution.manifest.v2+json"} -Uri https://dockerregistry.is.cosinus/v2/businesscentral/onprem/manifests/sha256:5d56bf354da17e81fae59171a0c11fdec06f94645bcc0bde8467e750670f6478
Both are not working.
Invoke-WebRequest` : {"errors":[{"code":"UNSUPPORTED","message":"The operation is unsupported."}]}
In Zeile:1 Zeichen:1
Invoke-WebRequest -Method Delete -Uri https://dockerregistry.is.cosin ...
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

@StefanScherer
Copy link
Owner

Thanks ;-)

I don't know how to remove only the tag, I thought of https://github.com/genuinetools/reg, but this also removes the image.
Maybe there are other command line tools to help you.

@StefanScherer
Copy link
Owner

Closing this as it is no bug in the Dockerfile for the registry.
But if you find any information how to do it you may add it for the community where to find a suitable tool or way to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant