Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker下删除镜像报错cannot be forced #37

Open
Bobjoy opened this issue Aug 21, 2020 · 0 comments
Open

Docker下删除镜像报错cannot be forced #37

Bobjoy opened this issue Aug 21, 2020 · 0 comments

Comments

@Bobjoy
Copy link
Owner

Bobjoy commented Aug 21, 2020

Docker下删除镜像报错 (cannot be forced) - image has dependent child images

  1. 删除镜像:docker rmi b01d82bd42de

  2. 报错如下:

Error response from daemon: conflict: unable to delete b01d82bd42de (cannot be forced) - image has dependent child images
  1. 大概意思就是这个镜像被别的镜像所依赖,不能强制删除,需要查找child images,再逐个删除

  2. 查找child images

docker image inspect --format='{{.RepoTags}} {{.Id}} {{.Parent}}' $(docker image ls -q --filter since=b01d82bd42de)
  1. 然后会出现所有依赖的等级关系,从最上面的开始删(可以对比CREATED时间,先删除时间相同的镜像
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant