Change dockerbulder format, no more tabs and COPY becomes INSERT to avoid conflict with contrib script
diff --git a/builder.go b/builder.go
index 5ede4ae..e252d3d 100644
--- a/builder.go
+++ b/builder.go
@@ -142,7 +142,7 @@
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 @@
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 @@
break
default:
- fmt.Fprintf(stdout, "Skipping unknown op %s\n", tmp[0])
+ fmt.Fprintf(stdout, "Skipping unknown instruction %s\n", instruction)
}
}
if base != nil {