the vfs driver does not create any mount, so it doesn't accept any
argument passed to MountImage. Drop the arguments so mount image can
be used in the tests suite.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Add "unshare", "create-storage-layer", and "storage-layers" commands to
the test helper, along with a "-U" flag to have it unshare when handling
a given command.
Add "-o" as an alias for the "--owner" flag to "copy".
Add "-r" as an alias for the "--ro" flag to "mount".
Add a "-q" flag to "layers" so that we can list just the IDs.
Drop mention of a couple of not-implemented options from
docs/containers-storage-create-layer.md.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
We do have commands that don't take any arguments, and quietly ignoring
arguments when they get them is not a good idea.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Have the action handlers return an error value, and let
main() format that error, if any; this avoids duplicated
error formating code in the action handlers, dropping
89 lines.
This might change the error format in some cases (typically
%v vs. %+v).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Interface added to mount image rootfs without any container.
image can be mounted only in ReadOnly mode.
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
We want to allow tools like podman/buildah to override default storage
container mount options on a container by container basis.
For example if the default mount options for containers/storage include
nodev or nosuid, we want to allow podman to turn these off if the user
specifies --privileged.
We also might want to turn off certain user namespace flags that will cause
buildah and podman build to work slower when creating container images.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
podman unmount wants to know if the image is only mounted 1 time
and refuse to unmount if the container state expects it to be mounted.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Add force to umount to force the umount of a container image
Add an interface to indicate whether or not the layer is mounted
Add a boolean return from unmount to indicate when the layer is really unmounted
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Rename the CLI tool to match the name that we gave the transport that
uses it in containers/image, which affects just about every consumer of
this library.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>