1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00

* Build: never remove temporary images and containers

Upstream-commit: caaea2e08f85438b7a6bee006e803f1c4351c445
Component: engine
This commit is contained in:
Solomon Hykes
2013-05-30 16:24:26 -07:00
parent 7959cb95a2
commit 4be68db978

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")
}