diff options
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r-- | pkg/domain/infra/abi/containers.go | 4 | ||||
-rw-r--r-- | pkg/domain/infra/abi/images.go | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index 4790bd58c..637531ee9 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -301,14 +301,14 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string, for _, ctr := range names { logrus.Debugf("Evicting container %q", ctr) report := entities.RmReport{Id: ctr} - id, err := ic.Libpod.EvictContainer(ctx, ctr, options.Volumes) + _, err := ic.Libpod.EvictContainer(ctx, ctr, options.Volumes) if err != nil { if options.Ignore && errors.Cause(err) == define.ErrNoSuchCtr { logrus.Debugf("Ignoring error (--allow-missing): %v", err) reports = append(reports, &report) continue } - report.Err = errors.Wrapf(err, "failed to evict container: %q", id) + report.Err = err reports = append(reports, &report) continue } diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index ffd4856fe..c02eb2bfc 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -376,7 +376,8 @@ func (ir *ImageEngine) Push(ctx context.Context, source string, destination stri options.Compress, signOptions, &dockerRegistryOptions, - nil) + nil, + options.Progress) if err != nil && errors.Cause(err) != storage.ErrImageUnknown { // Image might be a manifest list so attempt a manifest push if _, manifestErr := ir.ManifestPush(ctx, source, destination, options); manifestErr == nil { @@ -639,6 +640,10 @@ func (ir *ImageEngine) Remove(ctx context.Context, images []string, opts entitie for _, id := range images { img, err := ir.Libpod.ImageRuntime().NewFromLocal(id) if err != nil { + // attempt to remove image from storage + if forceErr := ir.Libpod.RemoveImageFromStorage(id); forceErr == nil { + continue + } rmErrors = append(rmErrors, err) continue } |