配置文件挂载到本地宿主机了
docker run -d -p 6000:5000 --restart=always --name registry -v `pwd`/config.yml:/etc/docker/registry/config.yml registry:2
修改过配置文件
查看仓库中的镜像信息
[root@Maple fanne_registry]# curl -X GET http://127.0.0.1:6000/v2/_catalog{"repositories":["myfirstimage","myfirstimage_2","myfirstimage_3"]}
获取digest值
[root@Maple fanne_registry]# curl -I -X GET http://127.0.0.1:6000/v2/myfirstimage/manifests/latest HTTP/1.1 200 OKContent-Length: 5559Content-Type: application/vnd.docker.distribution.manifest.v1+prettyjwsDocker-Content-Digest: sha256:3a07b4e06c73b2e3924008270c7f3c3c6e3f70d4dbb814ad8bff2697123ca33cDocker-Distribution-Api-Version: registry/2.0Etag: "sha256:3a07b4e06c73b2e3924008270c7f3c3c6e3f70d4dbb814ad8bff2697123ca33c"X-Content-Type-Options: nosniffDate: Sun, 31 Jul 2016 11:09:22 GMT
删除测试
[root@Maple fanne_registry]# curl -X DELETE http://127.0.0.1:6000/v2/myfirstimage/manifests/sha256:3a07b4e06c73b2e3924008270c7f3c3c6e3f70d4dbb814ad8bff2697123ca33c{"errors":[{"code":"MANIFEST_UNKNOWN","message":"manifest unknown"}]}
删除失败,这是为咋的