Why can't I delete a layer in my private docker registry (v2)?

I just installed docker-registry offline and can use the following command

curl -X GET http://localhost:5000/v2/

to get the right result.

However, when I use

curl -X DELETE http://localhost:5000/v2/<name>/blobs/<digest>

to remove the layer, it fails, I get:

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

I am using the default configuration from docker hub. And I studied the official configuration, but could not solve it.

How can i do this?

+4
source share
2 answers

You must add the delete: enabled: true parameter to /etc/docker/registry/config.yml

do this:

 version: 0.1
 log:
    fields:
        service: registry
 storage:
    cache:
        layerinfo: inmemory
    filesystem:
        rootdirectory: /var/lib/registry
    delete:
        enabled: true
 http:
    addr: :5000

Look here for more details.

Or adding the var environment to the container at boot time:

-e REGISTRY_STORAGE_DELETE_ENABLED=true
+4
source

:

REGISTRY_STORAGE_DELETE_ENABLED=true

:

REGISTRY_STORAGE_DELETE_ENABLED: "yes"

.

+3

Source: https://habr.com/ru/post/1607259/


All Articles