Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in deleting repository in a private registry V2 #1573

Closed
joda70 opened this issue Mar 29, 2016 · 9 comments
Closed

Error in deleting repository in a private registry V2 #1573

joda70 opened this issue Mar 29, 2016 · 9 comments
Labels

Comments

@joda70
Copy link

joda70 commented Mar 29, 2016

I would like to know the status of the delete operation implementation in the API v2 of docker registry.
I am able to get information up to manifest reference but when I try the delete operation I obtain:

curl -v --cacert /usr/local/share/ca-certificates/ca.crt -u 'user:pwd' -X GET https://hostname/v2/name/manifests/reference
... (the output report digest information)

curl -v --cacert /usr/local/share/ca-certificates/ca.crt -u 'user:pwd' -X DELETE https://hostname/v2/name/manifests/reference
...

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

  • Connection #0 to host hostname left intact
@ybshen
Copy link

ybshen commented Mar 29, 2016

you can try to add REGISTRY_STORAGE_DELETE_ENABLED=true when start the registry

@dmp42 dmp42 added the question label Mar 29, 2016
@dmp42 dmp42 closed this as completed Mar 29, 2016
@bhanushrestha
Copy link

@ybshen I am sorry if this sounds too simple, but could you please specify how or where do we add that

REGISTRY_STORAGE_DELETE_ENABLED=true
flag when we start the registry. Is it some sort of environment variable or command line flag?

@jheiss
Copy link
Contributor

jheiss commented May 25, 2017

@bhanushrestha See https://docs.docker.com/registry/configuration/ for details. But yes, REGISTRY_STORAGE_DELETE_ENABLED would be an environment variable that you would pass via the -e flag to docker run.

@Rukeith
Copy link

Rukeith commented Sep 20, 2018

@jheiss Sorry, I might miss. But I didn't found the variables REGISTRY_STORAGE_DELETE_ENABLED in document. There is configuration file.

@jheiss
Copy link
Contributor

jheiss commented Sep 20, 2018

The registry accepts configuration settings either via a file or via environment variables. So the environment variable REGISTRY_STORAGE_DELETE_ENABLED=true is equivalent to this in your config file:

storage:
  delete:
    enabled: true

@sosensible
Copy link

When I try to add the environment variable into my docker-compose.yaml it never seems to respond.

    environment:
      REGISTRY_STORAGE_DELETE_ENABLED: "true"

Changing it to equals failed as well as changing it to the number 1. It also would not work without quotes for text.

    environment:
      REGISTRY_STORAGE_DELETE_ENABLED: 1

@manishtomar
Copy link
Contributor

@sosensible Did you try deleting image after enabling that environment variable? https://docs.docker.com/registry/spec/api/#deleting-an-image

@romangallego
Copy link

I just went through the same issue and want to confirm that the solution suggested about enabling that environment variable in the config file works.
storage:
delete:
enabled: true

@mickours
Copy link

When I try to add the environment variable into my docker-compose.yaml it never seems to respond.

    environment:
      REGISTRY_STORAGE_DELETE_ENABLED: "true"

Changing it to equals failed as well as changing it to the number 1. It also would not work without quotes for text.

    environment:
      REGISTRY_STORAGE_DELETE_ENABLED: 1

This is because you are using a map value instead of a list which the correct format for docker compose.

This is the working version:

    environment:
    - REGISTRY_STORAGE_DELETE_ENABLED=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants