瀏覽代碼

Merge pull request #240 from thaJeztah/19.03_backport_lcowfromscratch

[19.03 backport] LCOW: Fix FROM scratch
Sebastiaan van Stijn 5 年之前
父節點
當前提交
c030578fe4
共有 1 個文件被更改,包括 3 次插入0 次删除
  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
 		}
 		}