mirror of
https://github.com/anthonyoteri/dredge.git
synced 2026-06-05 15:26:53 -04:00
Support deleting an image tag
If the Docker Registry API allows for images to be deleted, issuing the command `delete <image> <tag>` will result in the tag being removed from the server. A limitation of this change is that it will cause any unreferenced tags to become orphaned, requiring the garbage collector within the docker registry server to clean these up. This is because there is no way to efficiently determine if each of the layers are reused by other tags or images on the server. Implement delete logic Fix broken unit tests
This commit is contained in:
@@ -32,6 +32,7 @@ Options:
|
||||
-V, --version
|
||||
Print version
|
||||
```
|
||||
|
||||
### Checking the API Version
|
||||
|
||||
Perform a simple API Version check towards the registry endpoint
|
||||
@@ -87,6 +88,15 @@ Options:
|
||||
|
||||
Delete a tagged image from the registry
|
||||
|
||||
Note! This requires that the registry has storage delete rights enabled. For
|
||||
example, when creating the registry, setting the environment variable
|
||||
`REGISTRY_STORAGE_DELETE_ENABLED=true` to enable that feature. If that is not
|
||||
enabled, a `MethodNotAllowed` error will be returned.
|
||||
|
||||
Note! This will only remove the tag from the registry, it will not remove
|
||||
orphaned digests. For that, the garbage collector on the registry service must
|
||||
be run separately.
|
||||
|
||||
```shell
|
||||
Usage: dredge <REGISTRY> delete <IMAGE> <TAG>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user