mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix validation of plugins without rootfs in config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 6c7cb52009
)
This commit is contained in:
parent
25bbf8ab7c
commit
f02d46f050
1 changed files with 4 additions and 0 deletions
|
@ -301,6 +301,10 @@ func configToRootFS(c []byte) (*image.RootFS, error) {
|
||||||
if err := json.Unmarshal(c, &pluginConfig); err != nil {
|
if err := json.Unmarshal(c, &pluginConfig); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// validation for empty rootfs is in distribution code
|
||||||
|
if pluginConfig.Rootfs == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return rootFSFromPlugin(pluginConfig.Rootfs), nil
|
return rootFSFromPlugin(pluginConfig.Rootfs), nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue