mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Block (v2) pulling Linux images
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
4498214a2a
commit
4e3d7ca4ae
1 changed files with 5 additions and 0 deletions
|
@ -550,6 +550,11 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
|
|||
if unmarshalledConfig.RootFS == nil {
|
||||
return "", "", errors.New("image config has no rootfs section")
|
||||
}
|
||||
// https://github.com/docker/docker/issues/24766 - Err on the side of caution,
|
||||
// explicitly blocking images intended for linux from the Windows daemon
|
||||
if unmarshalledConfig.OS == "linux" {
|
||||
return "", "", fmt.Errorf("image operating system %q cannot be used on this platform", unmarshalledConfig.OS)
|
||||
}
|
||||
downloadRootFS = *unmarshalledConfig.RootFS
|
||||
downloadRootFS.DiffIDs = []layer.DiffID{}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue