From 6979d140f1c531fd32e885542be27407105ebf90 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 28 Jul 2020 10:25:14 -0400 Subject: Add podman image mount There are many use cases where you want to just mount an image without creating a container on it. For example you might want to just examine the content in an image after you pull it for security analysys. Or you might want to just use the executables on the image without running it in a container. The image is mounted readonly since we do not want people changing images. Signed-off-by: Daniel J Walsh --- pkg/rootless/rootless_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/rootless/rootless_linux.c') diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 8e0151496..d3e43e44d 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -211,7 +211,8 @@ can_use_shortcut () break; } - if (argv[argc+1] != NULL && strcmp (argv[argc], "container") == 0 && + if (argv[argc+1] != NULL && (strcmp (argv[argc], "container") == 0 || + strcmp (argv[argc], "image") == 0) && strcmp (argv[argc+1], "mount") == 0) { ret = false; -- cgit v1.2.3-54-g00ecf