From 1ffb0fc2d1d0e1acb43791591ebf2225a460df6d Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 14 Jan 2019 14:48:50 -0600 Subject: podman remote client -- add rmi allow the podman remote client to delete images Signed-off-by: baude --- libpod/adapter/runtime.go | 5 +++++ libpod/adapter/runtime_remote.go | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'libpod') diff --git a/libpod/adapter/runtime.go b/libpod/adapter/runtime.go index 9ce850aaa..883ae2c76 100644 --- a/libpod/adapter/runtime.go +++ b/libpod/adapter/runtime.go @@ -80,3 +80,8 @@ func (r *LocalRuntime) New(ctx context.Context, name, signaturePolicyPath, authf } return &ContainerImage{img}, nil } + +// RemoveImage calls into local storage and removes an image +func (r *LocalRuntime) RemoveImage(ctx context.Context, img *ContainerImage, force bool) (string, error) { + return r.Runtime.RemoveImage(ctx, img.Image, force) +} diff --git a/libpod/adapter/runtime_remote.go b/libpod/adapter/runtime_remote.go index 3eb53e4af..bb00350e0 100644 --- a/libpod/adapter/runtime_remote.go +++ b/libpod/adapter/runtime_remote.go @@ -216,3 +216,8 @@ func (ci *ContainerImage) TagImage(tag string) error { func (r RemoteRuntime) RemoveImage(force bool) error { return nil } + +// RemoveImage calls varlink to remove an image +func (r *LocalRuntime) RemoveImage(ctx context.Context, img *ContainerImage, force bool) (string, error) { + return iopodman.RemoveImage().Call(r.Conn, img.InputName, force) +} -- cgit v1.2.3-54-g00ecf