summaryrefslogtreecommitdiff
path: root/completions/bash
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-28 10:25:14 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-28 10:27:44 -0400
commit6979d140f1c531fd32e885542be27407105ebf90 (patch)
treee2d8c286c22eb5fe4065fa957fe043b546ed8c52 /completions/bash
parent288ebec6e737c105fa0ef43412de4e0a8997feb9 (diff)
downloadpodman-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 'completions/bash')
-rw-r--r--completions/bash/podman53
1 files changed, 53 insertions, 0 deletions
diff --git a/completions/bash/podman b/completions/bash/podman
index eb727ef63..f0c8e7394 100644
--- a/completions/bash/podman
+++ b/completions/bash/podman
@@ -1524,6 +1524,56 @@ _podman_info() {
esac
}
+_podman_image_umount() {
+ _podman_image_unmount
+}
+
+_podman_image_unmount() {
+ local boolean_options="
+ --all
+ -a
+ --help
+ -h
+ --force
+ -f
+ "
+ local options_with_args="
+ "
+
+ local all_options="$options_with_args $boolean_options"
+ case "$cur" in
+ -*)
+ COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
+ ;;
+ *)
+ __podman_complete_images --force-tag --id
+ ;;
+ esac
+}
+
+_podman_image_mount() {
+ local boolean_options="
+ --all
+ -a
+ --help
+ -h
+ "
+
+ local options_with_args="
+ --format
+ "
+
+ local all_options="$options_with_args $boolean_options"
+ case "$cur" in
+ -*)
+ COMPREPLY=($(compgen -W "$boolean_options $options_with_args" -- "$cur"))
+ ;;
+ *)
+ __podman_complete_images --force-tag --id
+ ;;
+ esac
+}
+
_podman_image_build() {
_podman_build
}
@@ -1590,6 +1640,7 @@ _podman_image() {
inspect
load
ls
+ mount
prune
pull
push
@@ -1598,6 +1649,8 @@ _podman_image() {
sign
tag
trust
+ umount
+ unmount
untag
"
local aliases="