docker / hub-feedback

Feedback and bug reports for the Docker Hub
https://hub.docker.com
233 stars 48 forks source link

Support the OCI delete API #2360

Open sudo-bmitch opened 6 months ago

sudo-bmitch commented 6 months ago

Problem description

Attempting to delete manifests using the OCI delete API fals with a 405 (method not allowed) error.

The definition for this API can be found at: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#deleting-manifests

docker info output

Docker Info:

n/a

Debug Information

Browser name and version: n/a

URL: n/a

Timetamp or time range: n/a

Public IP: n/a

Hub Username: n/a

Error messages (on screen or in browser console)

$ regctl -v debug manifest rm sudobmitch/demo:hello-test@sha256:1434aed52a241f43dd81fa4604eddc17ff39639ed80d81e4799779964ccb5444
...
DEBU[0000] Manifest delete                               digest="sha256:1434aed52a241f43dd81fa4604eddc17ff39639ed80d81e4799779964ccb5444" host=docker.io repo=sudobmitch/demo
DEBU[0000] http req                                      method=DELETE url="https://registry-1.docker.io/v2/sudobmitch/demo/manifests/sha256:1434aed52a241f43dd81fa4604eddc17ff39639ed80d81e4799779964ccb5444" withAuth=false
DEBU[0000] Auth request parsed                           challenge="[{bearer map[realm:https://auth.docker.io/token scope:repository:sudobmitch/demo:delete service:registry.docker.io]}]"
DEBU[0000] Auth scope added                              host=registry-1.docker.io scope="repository:sudobmitch/demo:pull,push"
DEBU[0000] http req                                      method=DELETE url="https://registry-1.docker.io/v2/sudobmitch/demo/manifests/sha256:1434aed52a241f43dd81fa4604eddc17ff39639ed80d81e4799779964ccb5444" withAuth=true
DEBU[0000] Request failed                                Status="Method Not Allowed" URL="https://registry-1.docker.io/v2/sudobmitch/demo/manifests/sha256:1434aed52a241f43dd81fa4604eddc17ff39639ed80d81e4799779964ccb5444"
failed to delete manifest docker.io/sudobmitch/demo:hello-test@sha256:1434aed52a241f43dd81fa4604eddc17ff39639ed80d81e4799779964ccb5444: request failed: unexpected http status code: Method Not Allowed [http 405]: {"errors":[{"code":"UNSUPPORTED","message":"The operation is unsupported."}]}

Screenshots of the issue (if applicable)

n/a

Task List

dannysauer commented 1 month ago

Possibly related to the undocumented delete API in https://github.com/docker/hub-feedback/issues/496#issuecomment-277562292. :)