mirror of
https://github.com/docker/cli.git
synced 2026-09-27 17:56:04 -04:00
LCOW: Auto-select OS
Signed-off-by: John Howard <jhoward@microsoft.com> Addresses https://github.com/moby/moby/pull/35089#issuecomment-367802698. This change enables the daemon to automatically select an image under LCOW that can be used if the API doesn't specify an explicit platform. For example: FROM supertest2014/nyan ADD Dockerfile / And docker build . will download the linux image (not a multi-manifest image) And similarly docker pull ubuntu will match linux/amd64 Upstream-commit: 35193c0e7dc301e1d2f6ea96e0ce34ffd2d4b88d Component: engine
This commit is contained in:
@@ -3,7 +3,6 @@ package distribution // import "github.com/docker/docker/distribution"
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/docker/docker/api"
|
||||
@@ -115,11 +114,6 @@ func Pull(ctx context.Context, ref reference.Named, imagePullConfig *ImagePullCo
|
||||
continue
|
||||
}
|
||||
|
||||
// Make sure we default the OS if it hasn't been supplied
|
||||
if imagePullConfig.OS == "" {
|
||||
imagePullConfig.OS = runtime.GOOS
|
||||
}
|
||||
|
||||
if err := puller.Pull(ctx, ref, imagePullConfig.OS); err != nil {
|
||||
// Was this pull cancelled? If so, don't try to fall
|
||||
// back.
|
||||
|
||||
Reference in New Issue
Block a user