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>
This commit is contained in:
parent
bf6eb85539
commit
6c7cb52009
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 {
|
||||
return nil, err
|
||||
}
|
||||
// validation for empty rootfs is in distribution code
|
||||
if pluginConfig.Rootfs == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return rootFSFromPlugin(pluginConfig.Rootfs), nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue