summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go26
1 files changed, 23 insertions, 3 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index c1b523cdf..5397e51f5 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -692,12 +692,32 @@ func (r *Runtime) Info() ([]define.InfoData, error) {
info = append(info, define.InfoData{Type: "store", Data: storeInfo})
registries := make(map[string]interface{})
- regData, err := sysreg.GetRegistriesData()
+ regs, err := sysreg.GetRegistries()
if err != nil {
return nil, errors.Wrapf(err, "error getting registries")
}
- for _, reg := range regData {
- registries[reg.Prefix] = reg
+ if len(regs) > 0 {
+ // v1 config file. We should use the search table format
+ registries["search"] = regs
+ ireg, err := sysreg.GetInsecureRegistries()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting registries")
+ }
+ registries["insecure"] = ireg
+ breg, err := sysreg.GetBlockedRegistries()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting registries")
+ }
+ registries["blocked"] = breg
+ } else {
+ // v2 config file. We can show the whole registry data
+ data, err := sysreg.GetRegistriesData()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting registries")
+ }
+ for _, reg := range data {
+ registries[reg.Prefix] = reg
+ }
}
info = append(info, define.InfoData{Type: "registries", Data: registries})