mirror of
https://github.com/docker/docs.git
synced 2026-04-01 08:48:56 +07:00
Fix a bug which caused builds to fail if ADD was the first command
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user