Forráskód Böngészése

Windows: Block 'FROM scratch'

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 10 éve
szülő
commit
6df6e2e405
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      builder/dispatchers.go

+ 4 - 0
builder/dispatchers.go

@@ -194,7 +194,11 @@ func from(b *builder, args []string, attributes map[string]bool, original string
 
 	name := args[0]
 
+	// Windows cannot support a container with no base image.
 	if name == NoBaseImageSpecifier {
+		if runtime.GOOS == "windows" {
+			return fmt.Errorf("Windows does not support FROM scratch")
+		}
 		b.image = ""
 		b.noBaseImage = true
 		return nil