From 22c8270135620bbbeb988076378173e452ec04af Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 3 Oct 2020 06:56:42 -0400 Subject: fix podman container exists and diff for storage containers Current these commands only check if a container exists in libpod. With this fix, the commands will also check if they are in containers/storage. This allows users to look at differences within a buildah or CRI-O container. Currently buildah diff does not exists, so this helps out in that situation as well as in CRI-O since the cri does not implement a diff command. Signed-off-by: Daniel J Walsh --- libpod/runtime_cstorage.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpod/runtime_cstorage.go') diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index 03eebeefc..61fdd42d3 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -52,6 +52,10 @@ func (r *Runtime) ListStorageContainers() ([]*StorageContainer, error) { return finalCtrs, nil } +func (r *Runtime) StorageContainer(idOrName string) (*storage.Container, error) { + return r.store.Container(idOrName) +} + // RemoveStorageContainer removes a container from c/storage. // The container WILL NOT be removed if it exists in libpod. // Accepts ID or full name of container. -- cgit v1.2.3-54-g00ecf