diff --git a/buildfile.go b/buildfile.go index f1e08b20fc..88dcadbf90 100644 --- a/buildfile.go +++ b/buildfile.go @@ -188,6 +188,9 @@ func (b *buildFile) CmdInsert(args string) error { } func (b *buildFile) CmdAdd(args string) error { + if b.context == "" { + return fmt.Errorf("No context given. Impossible to use ADD") + } tmp := strings.SplitN(args, " ", 2) if len(tmp) != 2 { return fmt.Errorf("Invalid INSERT format") diff --git a/commands.go b/commands.go index a79a24bff7..5d65daeb57 100644 --- a/commands.go +++ b/commands.go @@ -175,7 +175,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error { if _, err := w.CreateFormFile("Context", cmd.Arg(0)+"."+compression.Extension()); err != nil { return err } - multipartBody = io.MultiReader(multipartBody, utils.ProgressReader(ioutil.NopCloser(context), -1, os.Stdout, "Uploading Context %v/%v (%v)", false)) + multipartBody = io.MultiReader(multipartBody, utils.ProgressReader(ioutil.NopCloser(context), -1, os.Stdout, "Uploading Context %v/%v (%v)\r", false)) } // Send the multipart request with correct content-type