remove removes the image along with all dangling parent images that no other image depends on. The image must not be set read-only and not be used by containers. Returns IDs of removed/untagged images in order. If the image is used by containers return storage.ErrImageUsedByContainer. Use force t
(ctx context.Context, rmMap map[string]*RemoveImageReport, referencedBy string, options *RemoveImagesOptions)
| 345 | // This function is internal. Users of libimage should always use |
| 346 | // `(*Runtime).RemoveImages()`. |
| 347 | func (i *Image) remove(ctx context.Context, rmMap map[string]*RemoveImageReport, referencedBy string, options *RemoveImagesOptions) ([]string, error) { |
| 348 | processedIDs := []string{} |
| 349 | return i.removeRecursive(ctx, rmMap, processedIDs, referencedBy, options) |
| 350 | } |
| 351 | |
| 352 | func (i *Image) removeRecursive(ctx context.Context, rmMap map[string]*RemoveImageReport, processedIDs []string, referencedBy string, options *RemoveImagesOptions) ([]string, error) { |
| 353 | // If referencedBy is empty, the image is considered to be removed via |
no test coverage detected