mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #895 from dotcloud/build-fixes
- Builder: fix a bug which caused builds to fail if ADD was the first command
This commit is contained in:
commit
30f604517a
1 changed files with 2 additions and 0 deletions
|
@ -178,6 +178,8 @@ func (b *buildFile) CmdAdd(args string) error {
|
||||||
cmd := b.config.Cmd
|
cmd := b.config.Cmd
|
||||||
|
|
||||||
// Create the container and start it
|
// 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)
|
container, err := b.builder.Create(b.config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue