mirror of
https://github.com/containers/podman.git
synced 2025-06-03 03:07:56 +08:00
20 lines
443 B
Go
20 lines
443 B
Go
package buildah
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
// Unmount unmounts a build container.
|
|
func (b *Builder) Unmount() error {
|
|
_, err := b.store.Unmount(b.ContainerID, false)
|
|
if err != nil {
|
|
return errors.Wrapf(err, "error unmounting build container %q", b.ContainerID)
|
|
}
|
|
b.MountPoint = ""
|
|
err = b.Save()
|
|
if err != nil {
|
|
return errors.Wrapf(err, "error saving updated state for build container %q", b.ContainerID)
|
|
}
|
|
return nil
|
|
}
|