mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
LCOW: Check OS in takeLayerReference
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
592a15b7a9
commit
d8dbba14fd
1 changed files with 3 additions and 0 deletions
|
@ -158,6 +158,9 @@ func (l *tarexporter) takeLayerReference(id image.ID, imgDescr *imageDescriptor)
|
|||
if os == "" {
|
||||
os = runtime.GOOS
|
||||
}
|
||||
if !system.IsOSSupported(os) {
|
||||
return fmt.Errorf("os %q is not supported", os)
|
||||
}
|
||||
layer, err := l.lss[os].Get(topLayerID)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Reference in a new issue