mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Trim the splited builder lines
This commit is contained in:
parent
15ea5a479a
commit
4ebec08add
1 changed files with 4 additions and 4 deletions
|
@ -191,8 +191,8 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e
|
|||
if len(tmp) != 2 {
|
||||
return nil, fmt.Errorf("Invalid Dockerfile format")
|
||||
}
|
||||
instruction := tmp[0]
|
||||
arguments := tmp[1]
|
||||
instruction := strings.Trim(tmp[0], " ")
|
||||
arguments := strings.Trim(tmp[1], " ")
|
||||
switch strings.ToLower(instruction) {
|
||||
case "from":
|
||||
fmt.Fprintf(stdout, "FROM %s\n", arguments)
|
||||
|
@ -247,8 +247,8 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e
|
|||
if len(tmp) != 2 {
|
||||
return nil, fmt.Errorf("Invalid INSERT format")
|
||||
}
|
||||
sourceUrl := tmp[0]
|
||||
destPath := tmp[1]
|
||||
sourceUrl := strings.Trim(tmp[0], "")
|
||||
destPath := strings.Trim(tmp[1], " ")
|
||||
fmt.Fprintf(stdout, "COPY %s to %s in %s\n", sourceUrl, destPath, base.ShortId())
|
||||
|
||||
file, err := Download(sourceUrl, stdout)
|
||||
|
|
Loading…
Reference in a new issue