mirror of
https://github.com/containers/skopeo.git
synced 2026-02-03 07:48:30 +00:00
buildah mount should work like the mount command and list all mount points when no options are specified. Need buildah umount to remove mount point from the database when a mount point is umounted. Also remove Mounts field from the builder object. We only support a single mount point so no reason for this field any longer. Signed-off-by: Dan Walsh <dwalsh@redhat.com> Closes: #124 Approved by: nalind
18 lines
399 B
Go
18 lines
399 B
Go
package buildah
|
|
|
|
// Mount mounts a container's root filesystem in a location which can be
|
|
// accessed from the host, and returns the location.
|
|
func (b *Builder) Mount(label string) (string, error) {
|
|
mountpoint, err := b.store.Mount(b.ContainerID, label)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
b.MountPoint = mountpoint
|
|
|
|
err = b.Save()
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return mountpoint, nil
|
|
}
|