Files
Urvashi Mohnani 35438b6c86 Set --force-rm for podman build to true by default
Since we use buildah containers for the build process, the
user will not know if we have any buildah containers lingering
due to a failed build. Setting this to true by default till
we figure out a better way to solve this.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2018-11-08 15:22:29 +00:00

18 lines
426 B
Go

package buildah
import (
"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 %q", b.ContainerID)
}
b.MountPoint = ""
b.Container = ""
b.ContainerID = ""
return nil
}