Git Product home page Git Product logo

Comments (5)

pwFoo avatar pwFoo commented on June 4, 2024

I think the registry I used for testing runs with delete disabled... I'll check this.

from reg.

pwFoo avatar pwFoo commented on June 4, 2024

Enabled delete by ENV VAR REGISTRY_STORAGE_DELETE_ENABLED: true:

/ # echo $REGISTRY_STORAGE_DELETE_ENABLED
true

and inside the config /etc/docker/registry/config.yml:

/ # cat /etc/docker/registry/config.yml 
version: 0.1
log:
  fields:
    service: registry
storage:
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /var/lib/registry
  delete:
    enabled: true
http:
  addr: :5000
  headers:
    X-Content-Type-Options: [nosniff]
health:
  storagedriver:
    enabled: true
    interval: 10s
    threshold: 3

But deleted images still there...

reg --registry https://myregistry delete alpine@sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647
Deleted alpine@sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647
reg --registry https://myregistry delete alpine:latest@sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647
Deleted alpine:latest@sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647

Image is still listed:

reg --registry https://myregistry ls
Repositories for https://myregistry
REPO                TAGS
alpine              latest

from reg.

pwFoo avatar pwFoo commented on June 4, 2024

It seems to work with debugging to get the correct ref:

2017/11/24 15:20:02 ref: sha256:4b8ffaaa896d40622ac10dc6662204f429f1c8c5714be62a6493a7895f664098

Delete works with that ref used. Usage is a little bit strange, but it works that way.

from reg.

wrfly avatar wrfly commented on June 4, 2024

@pwFoo https://stackoverflow.com/questions/25436742/how-to-delete-images-from-a-private-docker-registry

from reg.

pwFoo avatar pwFoo commented on June 4, 2024

Tested the latest release, but problem isn't fixed I think. Still need debug info to get the correct ref with reg from registry.

nwe-reg manifest openvpn:v0.0.1
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
   "config": {
     "mediaType": "application/vnd.docker.container.image.v1+json",
     "size": 2059,
     "digest": "sha256:6a2e9a93fa6ffa47b83c32a7afb6fdff0fc1b765ef7c5a962e4e2e27d03a0c05"
   },
   "layers": [
     {
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
       "size": 1991435,
       "digest": "sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647"
     },
     {
       "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
       "size": 2487962,
       "digest": "sha256:500d7c908a09320a3ceb63b207aea199389dbecde18950363115287359ead8ee"
     }
   ]
 }

The workaround I use.

# nwe-reg -d manifest openvpn:v0.0.1 |grep "ref:"
[...]
2017/12/14 10:02:11 ref: sha256:fc785bb24e2b65fffff2ae72897d80c0c564100f167cfba08f114aaa7c4fd560

from reg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.