Sfoglia il codice sorgente

LCOW: Fix FROM scratch

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 6 anni fa
parent
commit
20b11792e8
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      daemon/images/image_builder.go

+ 3 - 0
daemon/images/image_builder.go

@@ -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) {
 func (i *ImageService) GetImageAndReleasableLayer(ctx context.Context, refOrID string, opts backend.GetImageAndLayerOptions) (builder.Image, builder.ROLayer, error) {
 	if refOrID == "" { // ie FROM scratch
 	if refOrID == "" { // ie FROM scratch
 		os := runtime.GOOS
 		os := runtime.GOOS
+		if runtime.GOOS == "windows" {
+			os = "linux"
+		}
 		if opts.Platform != nil {
 		if opts.Platform != nil {
 			os = opts.Platform.OS
 			os = opts.Platform.OS
 		}
 		}