charm does not support deleting images from a registry

Bug #1808200 reported by Jamon Camisso
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Docker Registry Charm
Fix Released
Medium
Kevin W Monroe

Bug Description

Attempting to delete an image from a registry configured with the charm results in an error:

curl -u "user:pass" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X DELETE https://<registryurl>:5000/v2/busybox/manifests/<sha256 hash>

{"errors":[{"code":"UNSUPPORTED","message":"The operation is unsupported."}]}

It looks like config.yml just needs storage to include a delete option, e.g.:

storage:
  delete:
    enabled: true
  swift: {.....}
  redirect: {.....}

Changed in layer-docker-registry:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Tom Haddon (mthaddon) wrote :

I think the charm should support this via an action, fwiw. Since the usage of this feature would most likely be for security reasons (because a particular image is known to be bad), it would be good to get this relatively soon.

Changed in layer-docker-registry:
status: Triaged → In Progress
Changed in layer-docker-registry:
assignee: nobody → Kevin W Monroe (kwmonroe)
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

This is up for review at:
https://github.com/CanonicalLtd/docker-registry-charm/pull/31

And available to test from the beta channel with:
cs:~containers/docker-registry-125

Changed in layer-docker-registry:
status: In Progress → Fix Committed
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

Released to stable at revision 136:

https://jujucharms.com/u/containers/docker-registry/

Note, we implemented both options to delete images as discussed in this bug:
1 - juju run-action --wait docker-registry/0 rmi image="ubuntu:18.04"
2 - juju config docker-registry storage-delete=true

Changed in layer-docker-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.