mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #15602 from Microsoft/10662-blockfromscratch
Windows: Block 'FROM scratch'
This commit is contained in:
commit
a6e0a6852d
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue