Merge pull request #240 from thaJeztah/19.03_backport_lcowfromscratch

[19.03 backport] LCOW: Fix FROM scratch
This commit is contained in:
Sebastiaan van Stijn 2020-01-23 20:30:23 +01:00 committed by GitHub
commit c030578fe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}