* Build: never remove temporary images and containers

This commit is contained in:
Solomon Hykes 2013-05-30 16:24:26 -07:00
parent c903a6baf8
commit caaea2e08f

View file

@ -298,8 +298,6 @@ func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
}
func (b *buildFile) Build(dockerfile, context io.Reader) (string, error) {
defer b.clearTmp(b.tmpContainers, b.tmpImages)
if context != nil {
name, err := ioutil.TempDir("/tmp", "docker-build")
if err != nil {
@ -350,9 +348,6 @@ func (b *buildFile) Build(dockerfile, context io.Reader) (string, error) {
fmt.Fprintf(b.out, "Build successful.\n===> %s\n", b.image)
return b.image, nil
}
for i := range b.tmpContainers {
delete(b.tmpContainers, i)
}
return "", fmt.Errorf("An error occured during the build\n")
}