aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-09 16:28:36 +0200
committerGitHub <noreply@github.com>2019-08-09 16:28:36 +0200
commit00a20f78f07a1ce3e98c6182d0fd320c63314ae1 (patch)
tree9862c68c51ec34cc7dd2551718d9593e66e57dc3 /libpod
parent2a190365f2db8c167c56fe5d8f1e267f0cc10dae (diff)
parente27ee5c840ac1ea10f3055287cc8256cddeeb083 (diff)
downloadpodman-00a20f78f07a1ce3e98c6182d0fd320c63314ae1.tar.gz
podman-00a20f78f07a1ce3e98c6182d0fd320c63314ae1.tar.bz2
podman-00a20f78f07a1ce3e98c6182d0fd320c63314ae1.zip
Merge pull request #3721 from baude/rmifunsies
make rmi messages more compatible with docker
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_img.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index 4055734eb..20dee4080 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -28,6 +28,7 @@ import (
// RemoveImage deletes an image from local storage
// Images being used by running containers can only be removed if force=true
func (r *Runtime) RemoveImage(ctx context.Context, img *image.Image, force bool) (string, error) {
+ var returnMessage string
r.lock.Lock()
defer r.lock.Unlock()
@@ -93,7 +94,11 @@ func (r *Runtime) RemoveImage(ctx context.Context, img *image.Image, force bool)
err = errStorage
}
}
- return img.ID(), err
+ for _, name := range img.Names() {
+ returnMessage = returnMessage + fmt.Sprintf("Untagged: %s\n", name)
+ }
+ returnMessage = returnMessage + fmt.Sprintf("Deleted: %s", img.ID())
+ return returnMessage, err
}
// Remove containers that are in storage rather than Podman.