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 --- completions/bash/podman | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'completions/bash/podman') 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=" -- cgit v1.2.3-54-g00ecf