storage icon indicating copy to clipboard operation
storage copied to clipboard

Mount image by name with CLI

Open pxeger opened this issue 2 years ago • 1 comments

Right now, if I want to use the containers-storage CLI tool to mount an image so I can explore its filesystem (without creating a container), I seem to have to:

  1. run containers-storage image myimagename
  2. take the "Top layer" id from its output,
  3. then use containers-storage mount toplayerid to mount it

The help page for containers-storage mount says it accepts a LayerOrContainerNameOrID, suggesting I should be able to use myimagename directly in the mount command. However, this doesn't work, producing an error layer not known while mounting myiamgename (and, curiously, an extra blank line).

Is this a bug? If not, it's a feature request: could this be made possible?

pxeger avatar Jun 30 '23 14:06 pxeger

Bizarrely, it seems that if the --read-only option is used, then mounting with an image name works, and mounting with a layer ID doesn't work!

pxeger avatar Jun 30 '23 17:06 pxeger