From 803a8d86e56fed356ba2068960d3831f71400836 Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Wed, 1 May 2013 13:45:35 -0700 Subject: [PATCH] Change dockerbulder format, no more tabs and COPY becomes INSERT to avoid conflict with contrib script --- builder.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builder.go b/builder.go index 5ede4ae5b..e252d3d8c 100644 --- a/builder.go +++ b/builder.go @@ -142,7 +142,7 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e if len(line) == 0 || line[0] == '#' { continue } - tmp := strings.SplitN(line, " ", 2) + tmp := strings.SplitN(line, " ", 2) if len(tmp) != 2 { return nil, fmt.Errorf("Invalid Dockerfile format") } @@ -192,13 +192,13 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e image = base break - case "copy": + case "insert": if image == nil { return nil, fmt.Errorf("Please provide a source image with `from` prior to copy") } tmp2 := strings.SplitN(tmp[1], " ", 2) if len(tmp) != 2 { - return nil, fmt.Errorf("Invalid COPY format") + return nil, fmt.Errorf("Invalid INSERT format") } fmt.Fprintf(stdout, "COPY %s to %s in %s\n", tmp2[0], tmp2[1], base.ShortId()) @@ -240,7 +240,7 @@ func (builder *Builder) Build(dockerfile io.Reader, stdout io.Writer) (*Image, e break default: - fmt.Fprintf(stdout, "Skipping unknown op %s\n", tmp[0]) + fmt.Fprintf(stdout, "Skipping unknown instruction %s\n", instruction) } } if base != nil {