* Build: never remove temporary images and containers
This commit is contained in:
parent
c903a6baf8
commit
caaea2e08f
1 changed files with 0 additions and 5 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue