registry:2通过 docker-compose运行图像1.27.4,docker 本身位于19.03.13.
注册表被配置为“pull through cache”,也被某些人称为“代理”或“镜像”。设置非常基础,遵循官方文档:
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
proxy:
remoteurl: https://registry-1.docker.io
当使用标准程序通过 API 删除此注册表中的图像时...
查找标签名称
export HEADER="Accept: application/vnd.docker.distribution.manifest.v2+json" curl -s -H $HEADER https://<HOST>/v2/<CATALOG>/tags/list找到对应的SHA
curl -sI -k -H $HEADER https://<HOST>/v2/<CATALOG>/manifests/<TAG>通过 SHA 删除
curl -H $HEADER -X DELETE https://<HOST>/v2/<CATALOG>/manifests/<SHA>
...我得到最后一个命令的 404:
404 page not found
当我proxy对注册表配置中注释掉的位执行相同操作时,它可以工作。
无法反对这样的“通过缓存拉取”注册表,这感觉非常熟悉,公平地说,这是有记录的。这个用例不是——或者是吗?