How can I delete a mistakenly added tag from an image in a private Docker registry? The option -rmi doesn't seem to work for remote images in Docker 1.9.1.
user@ubuntu-user:~$ docker --version
Docker version 1.9.1, build a34a1d5
user@ubuntu-user:~$ docker search myregistry:5000/user/image
user@ubuntu-user:~$ docker rmi myregistry:5000/user/image:20160119-20160120
Error response from daemon: could not find image: no such id: myregistry:5000/user/image:20160119-20160120
Error: failed to remove images: [myregistry:5000/user/image:20160119-20160120]
Just recently ran in to this myself, but then thought, why delete, I'll just re-release an older version:
docker push my/image:1.0.0
docker push my/image:1.0.1 # This is broken
docker tag my/image:1.0.0 my/image:1.0.2
docker push my/image:1.0.2
The broken image will still be there, but it's unlikely anyone will use it as there's a "newer" version available. Obviously it's better to fix forward but in a pinch this is a fast solution.
If the reason you want to delete it is that it has secrets or something exposed you didn't want getting out, the other solutions are better, but assume whatever it was is now known and change it (passwords, keys, whatever).