-
Notifications
You must be signed in to change notification settings - Fork 177
Introduce --force option on image rm
command
#762
Conversation
2678e09
to
d551834
Compare
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
} | ||
} | ||
return failures.ErrorOrNil() | ||
} | ||
return fmt.Errorf("unable to delete %q - App is referenced in multiple repositories", reference.FamiliarString(ref)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say here something like ", can be forced (-f)
" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker image CLI for equivalent scenario:
conflict: unable to delete xyz (must be forced) - image is referenced in multiple repositories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll address this in a subsequent PR with bundlestore refactoring
What does the output of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- What I did
Added
--force
option ondocker app image rm
command- How I did it
Bundlestore do check all reference for ID to remove, and delete them
Also introduced bundle store cleanup by removing empty paths as a tag is deleted
- How to verify it
docker app build -t foo (get built image ID)
docker app tag foo bar
docker app image rm {ID} // will fail
docker app image rm --force {ID} // won't fail
docker app image ls
- Description for the changelog
Added
--force
option ondocker app image rm
command- A picture of a cute animal (not mandatory)