mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Fix validation of plugins without rootfs in config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> Upstream-commit: 6c7cb520094866cacbecb96695aed2d67d8a64a0 Component: engine
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user