summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go22
1 files changed, 6 insertions, 16 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index f53789e89..d31d00ae4 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -29,7 +29,6 @@ import (
"github.com/containers/podman/v3/libpod/plugin"
"github.com/containers/podman/v3/libpod/shutdown"
"github.com/containers/podman/v3/pkg/cgroups"
- "github.com/containers/podman/v3/pkg/registries"
"github.com/containers/podman/v3/pkg/rootless"
"github.com/containers/podman/v3/pkg/util"
"github.com/containers/storage"
@@ -932,7 +931,9 @@ func (r *Runtime) LibimageRuntime() *libimage.Runtime {
// SystemContext returns the imagecontext
func (r *Runtime) SystemContext() *types.SystemContext {
- return r.imageContext
+ // Return the context from the libimage runtime. libimage is sensitive
+ // to a number of env vars.
+ return r.libimageRuntime.SystemContext()
}
// GetOCIRuntimePath retrieves the path of the default OCI runtime.
@@ -1042,9 +1043,9 @@ func (r *Runtime) Reload() error {
if err := r.reloadStorageConf(); err != nil {
return err
}
- if err := reloadRegistriesConf(); err != nil {
- return err
- }
+ // Invalidate the registries.conf cache. The next invocation will
+ // reload all data.
+ sysregistriesv2.InvalidateCache()
return nil
}
@@ -1059,17 +1060,6 @@ func (r *Runtime) reloadContainersConf() error {
return nil
}
-// reloadRegistries reloads the registries.conf
-func reloadRegistriesConf() error {
- sysregistriesv2.InvalidateCache()
- registries, err := sysregistriesv2.GetRegistries(&types.SystemContext{SystemRegistriesConfPath: registries.SystemRegistriesConfPath()})
- if err != nil {
- return err
- }
- logrus.Infof("applied new registry configuration: %+v", registries)
- return nil
-}
-
// reloadStorageConf reloads the storage.conf
func (r *Runtime) reloadStorageConf() error {
configFile, err := storage.DefaultConfigFile(rootless.IsRootless())