2017-02-11 00:48:15 +08:00
|
|
|
package buildah
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2017-02-11 03:45:06 +08:00
|
|
|
// Delete removes the working container. The Builder object should not be used
|
|
|
|
// after this method is called.
|
2017-02-11 00:48:15 +08:00
|
|
|
func (b *Builder) Delete() error {
|
|
|
|
if err := b.store.DeleteContainer(b.ContainerID); err != nil {
|
|
|
|
return fmt.Errorf("error deleting build container: %v", err)
|
|
|
|
}
|
|
|
|
b.MountPoint = ""
|
|
|
|
b.Container = ""
|
|
|
|
b.ContainerID = ""
|
|
|
|
return nil
|
|
|
|
}
|