mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Podman info output plugin information
For docker compat include information about available volume, log and network drivers which should be listed under the plugins key. Fixes #11265 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -18,6 +18,7 @@ import (
|
||||
"github.com/containers/image/v5/pkg/sysregistriesv2"
|
||||
"github.com/containers/podman/v3/libpod/define"
|
||||
"github.com/containers/podman/v3/libpod/linkmode"
|
||||
"github.com/containers/podman/v3/libpod/network"
|
||||
"github.com/containers/podman/v3/pkg/cgroups"
|
||||
"github.com/containers/podman/v3/pkg/rootless"
|
||||
"github.com/containers/storage"
|
||||
@ -65,6 +66,16 @@ func (r *Runtime) info() (*define.Info, error) {
|
||||
if len(regs) > 0 {
|
||||
registries["search"] = regs
|
||||
}
|
||||
volumePlugins := make([]string, 0, len(r.config.Engine.VolumePlugins)+1)
|
||||
// the local driver always exists
|
||||
volumePlugins = append(volumePlugins, "local")
|
||||
for plugin := range r.config.Engine.VolumePlugins {
|
||||
volumePlugins = append(volumePlugins, plugin)
|
||||
}
|
||||
info.Plugins.Volume = volumePlugins
|
||||
// TODO move this into the new network interface
|
||||
info.Plugins.Network = []string{network.BridgeNetworkDriver, network.MacVLANNetworkDriver}
|
||||
info.Plugins.Log = logDrivers
|
||||
|
||||
info.Registries = registries
|
||||
return &info, nil
|
||||
|
Reference in New Issue
Block a user