Fix a bug which caused builds to fail if ADD was the first command

Upstream-commit: 080f35fe65a7bb88ccf2abefa985c7a4ae88a47b
Component: engine
This commit is contained in:
Solomon Hykes
2013-06-15 09:16:35 -07:00
parent 3562ef766f
commit 8e1839cf72
+2
View File
@@ -178,6 +178,8 @@ func (b *buildFile) CmdAdd(args string) error {
cmd := b.config.Cmd
// Create the container and start it
b.config.Cmd = []string{"/bin/sh", "-c", fmt.Sprintf("#(nop) ADD %s in %s", orig, dest)}
b.config.Image = b.image
container, err := b.builder.Create(b.config)
if err != nil {
return err