From 6df6e2e405a08bac2a81639349bc9a20c6014619 Mon Sep 17 00:00:00 2001 From: John Howard Date: Fri, 14 Aug 2015 18:17:19 -0700 Subject: [PATCH] Windows: Block 'FROM scratch' Signed-off-by: John Howard --- builder/dispatchers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/dispatchers.go b/builder/dispatchers.go index a810e2cc6..aa4adabd1 100644 --- a/builder/dispatchers.go +++ b/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