Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Docker注册表中允许临时删除_Docker - Fatal编程技术网

在Docker注册表中允许临时删除

在Docker注册表中允许临时删除,docker,Docker,我有我的docker注册表工作,我有我的图像导入。我想使用curl命令删除图像 curl -X DELETE https://myhost:5000/v2/goodimage/manifest/1 我一直在 {{"errors":[{"code":"UNSUPPORTED", "message":"The operation is unsupported."}]} 在谷歌上,在我的配置文件中,我必须设置 enabled deleted: true 我要尝试连接到容器: docker

我有我的docker注册表工作,我有我的图像导入。我想使用curl命令删除图像

curl -X DELETE https://myhost:5000/v2/goodimage/manifest/1
我一直在

{{"errors":[{"code":"UNSUPPORTED", "message":"The operation is unsupported."}]}
在谷歌上,在我的配置文件中,我必须设置

enabled
    deleted: true
我要尝试连接到容器:

docker attach {{containerid}}  but this hangs

我的容器已经在运行了,我不想为了删除一个而吹走我已经加载的图像。是否有我缺少的解决方案?

您不应该修改正在运行的容器中的配置。下一次更换容器时会丢失。相反,这应该进入您的环境或作为卷装载。对于环境变量,这将是:

REGISTRY_STORAGE_DELETE_ENABLED=true
有关配置文件和传入值的方法的完整详细信息,请访问:

请注意,删除映像清单不会删除磁盘上的基础Blob。您需要为此运行一个单独的垃圾收集过程


您无法附加到图像。您只能附加到容器。此外,您在Docker中加载的图像与您注册表中的图像没有任何关系。这已更新为使用正确的术语。卷装载是保存我的原因。现在我甚至不需要担心删除,我可以直接删除目录。谢谢你的帮助。