mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 23:38:24 +00:00
Merge pull request #13681 from tiborvass/carry-11784
Carry 11784: rmi dangling is unsafe when pulling
This commit is contained in:
@@ -137,6 +137,9 @@ func (daemon *Daemon) imgDeleteHelper(name string, list *[]types.ImageDelete, fi
|
||||
}
|
||||
|
||||
func (daemon *Daemon) canDeleteImage(imgID string, force bool) error {
|
||||
if daemon.Graph().IsHeld(imgID) {
|
||||
return fmt.Errorf("Conflict, cannot delete because %s is held by an ongoing pull or build", stringid.TruncateID(imgID))
|
||||
}
|
||||
for _, container := range daemon.List() {
|
||||
if container.ImageID == "" {
|
||||
// This technically should never happen, but if the container
|
||||
|
||||
Reference in New Issue
Block a user