github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-image-mount.1.md (about)

     1  % podman-image-mount 1
     2  
     3  ## NAME
     4  podman\-image\-mount - Mount an image's root filesystem
     5  
     6  ## SYNOPSIS
     7  **podman image mount** [*options*] [*image* ...]
     8  
     9  ## DESCRIPTION
    10  Mounts the specified images' root file system in a location which can be
    11  accessed from the host, and returns its location.
    12  
    13  The `podman image mount` command without any arguments lists all of the
    14  currently mounted images.
    15  
    16  Rootless mode only supports mounting VFS driver, unless podman is run in a user namespace.
    17  Use the `podman unshare` command to enter the user namespace. All other storage drivers fail to mount.
    18  
    19  ## RETURN VALUE
    20  The location of the mounted file system.  On error an empty string and errno is
    21  returned.
    22  
    23  ## OPTIONS
    24  
    25  #### **--all**, **-a**
    26  
    27  Mount all images.
    28  
    29  #### **--format**=*format*
    30  
    31  Print the mounted images in specified format (json).
    32  
    33  ## EXAMPLE
    34  
    35  Mount multiple images. Note: In rootless mode, image mounting works only after executing the podman unshare command to enter the user namespace.
    36  ```
    37  podman image mount fedora ubi8-init
    38  /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
    39  /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
    40  ```
    41  
    42  List mounted images:
    43  ```
    44  podman image mount
    45  registry.fedoraproject.org/fedora:latest /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
    46  registry.access.redhat.com/ubi8-init:latest /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
    47  ```
    48  
    49  List mounted images in JSON format:
    50  ```
    51  podman image mount --format json
    52  [
    53   {
    54    "id": "00ff39a8bf19f810a7e641f7eb3ddc47635913a19c4996debd91fafb6b379069",
    55    "Names": [
    56     "sha256:58de585a231aca14a511347bc85b912a6f000159b49bc2b0582032911e5d3a6c"
    57    ],
    58    "Repositories": [
    59     "registry.fedoraproject.org/fedora:latest"
    60    ],
    61    "mountpoint": "/var/lib/containers/storage/overlay/0ccfac04663bbe8813b5f24502ee0b7371ce5bf3c5adeb12e4258d191c2cf7bc/merged"
    62   },
    63   {
    64    "id": "bcc2dc9a261774ad25a15e07bb515f9b77424266abf2a1252ec7bcfed1dd0ac2",
    65    "Names": [
    66     "sha256:d5f260b2e51b3ee9d05de1c31d261efc9af28e7d2d47cedf054c496d71424d63"
    67    ],
    68    "Repositories": [
    69     "registry.access.redhat.com/ubi8-init:latest"
    70    ],
    71    "mountpoint": "/var/lib/containers/storage/overlay/d66b58e3391ea8ce4c81316c72e22b332618f2a28b461a32ed673e8998cdaeb8/merged"
    72   }
    73  ]
    74  ```
    75  
    76  ## SEE ALSO
    77  **[podman(1)](podman.1.md)**, **[podman-image(1)](podman-image.1.md)**, **[podman-image-unmount(1)](podman-image-unmount.1.md)**, **[podman-unshare(1)](podman-unshare.1.md)**, **mount(8)**