diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go index 1822f57569..d4c2f5f649 100644 --- a/pkg/api/handlers/compat/info.go +++ b/pkg/api/handlers/compat/info.go @@ -192,6 +192,9 @@ func getSecOpts(sysInfo *sysinfo.SysInfo) []string { func getRuntimes(configInfo *config.Config) map[string]dockerSystem.RuntimeWithStatus { runtimes := map[string]dockerSystem.RuntimeWithStatus{} for name, paths := range configInfo.Engine.OCIRuntimes { + if len(paths) == 0 { + continue + } runtime := dockerSystem.RuntimeWithStatus{} runtime.Runtime = dockerSystem.Runtime{Path: paths[0], Args: nil} runtimes[name] = runtime