LCOW: Fix FROM scratch

Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 20b11792e8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
John Howard 2019-05-14 15:48:17 -07:00 committed by Sebastiaan van Stijn
parent ea84732a77
commit ba28377919
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,9 @@ func (i *ImageService) pullForBuilder(ctx context.Context, name string, authConf
func (i *ImageService) GetImageAndReleasableLayer(ctx context.Context, refOrID string, opts backend.GetImageAndLayerOptions) (builder.Image, builder.ROLayer, error) {
if refOrID == "" { // ie FROM scratch
os := runtime.GOOS
if runtime.GOOS == "windows" {
os = "linux"
}
if opts.Platform != nil {
os = opts.Platform.OS
}