Files
podman/vendor/github.com/projectatomic/buildah/delete.go
baude a824186ac9 Use buildah commit and bud in podman
Vendor in buildah and use as much of commit and bug as possible for podman
build and commit.

Resolves #586
Signed-off-by: baude <bbaude@redhat.com>

Closes: #681
Approved by: mheon
2018-04-27 20:51:07 +00:00

19 lines
493 B
Go

package buildah
import (
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
)
// Delete removes the working container. The buildah.Builder object should not
// be used after this method is called.
func (b *Builder) Delete() error {
if err := b.store.DeleteContainer(b.ContainerID); err != nil {
return errors.Wrapf(err, "error deleting build container")
}
b.MountPoint = ""
b.Container = ""
b.ContainerID = ""
return label.ReleaseLabel(b.ProcessLabel)
}