Add support for image volume subpaths

Image volumes (the `--mount type=image,...` kind, not the
`podman volume create --driver image ...` kind - it's strange
that we have two) are needed for our automount scheme, but the
request is that we mount only specific subpaths from the image
into the container. To do that, we need image volume subpath
support. Not that difficult code-wise, mostly just plumbing.

Also, add support to the CLI; not strictly necessary, but it
doesn't hurt anything and will make testing easier.

Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
Matt Heon
2024-04-18 14:56:19 -04:00
parent 273020160c
commit 693ae0ebc6
8 changed files with 47 additions and 2 deletions

View File

@ -41,6 +41,8 @@ Options specific to type=**image**:
- *rw*, *readwrite*: *true* or *false* (default if unspecified: *false*).
- *subpath*: Mount only a specific path within the image, instead of the whole image.
Options specific to **bind** and **glob**:
- *ro*, *readonly*: *true* or *false* (default if unspecified: *false*).