diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-07-28 10:25:14 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-07-28 10:27:44 -0400 |
commit | 6979d140f1c531fd32e885542be27407105ebf90 (patch) | |
tree | e2d8c286c22eb5fe4065fa957fe043b546ed8c52 /pkg/rootless | |
parent | 288ebec6e737c105fa0ef43412de4e0a8997feb9 (diff) | |
download | podman-6979d140f1c531fd32e885542be27407105ebf90.tar.gz podman-6979d140f1c531fd32e885542be27407105ebf90.tar.bz2 podman-6979d140f1c531fd32e885542be27407105ebf90.zip |
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 <dwalsh@redhat.com>
Diffstat (limited to 'pkg/rootless')
-rw-r--r-- | pkg/rootless/rootless_linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |