18
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WebUIから Docker Registry 2.0上のimageをDELETE

Last updated at Posted at 2015-11-08
  • Docker Registry 2.0にpushはできたが、DELETEができなくてハマっていた。
  • WebUI欲しいので探してみた。

参考

hyper/docker-registry-webとは

w4.png

  • docker build時のコマンドが確認できて良い。

docker-compose.yml

docker-compose.yml
 web:
   image: hyper/docker-registry-web
   ports:
     - "8080:8080"
   links:
     - registry
   environment:
    REGISTRY_HOST: registry
 
 registry:
   image: registry:2
   ports:
     - 5000:5000
   environment:
     REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /registry
+    REGISTRY_STORAGE_DELETE_ENABLED: 'True'
   volumes:
     - ./registry:/registry
  • registry:2 と記述すると、2015/11/8では2.2が降ってきました。dockerhub

起動

docker-compose up

W1.png

push
docker tag ubuntu localhost:5000/ubuntu
docker push localhost:5000/ubuntu

w2.png

w3.png

  • 削除できることを確認。

別の設定方法

/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
docker-compose.yml
 web:
   image: hyper/docker-registry-web
   ports:
     - "8080:8080"
   links:
     - registry
   environment:
    REGISTRY_HOST: registry

 registry:
   image: registry:2
   ports:
     - 5000:5000
   environment:
     REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /registry
   volumes:
     - ./registry:/registry
+    - ./config.yml:/etc/docker/registry/config.yml
docker-compose up
18
25
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?