Skip to content

Commit

Permalink
Merge pull request #15734 from KenMacD/add-path
Browse files Browse the repository at this point in the history
Include PATH in conmon env.
  • Loading branch information
openshift-merge-robot authored Sep 11, 2022
2 parents b9cbc0c + 6091ff4 commit 940d3d8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libpod/oci_conmon_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1266,10 +1266,15 @@ func (r *ConmonOCIRuntime) configureConmonEnv(runtimeDir string) []string {
env = append(env, e)
}
}
conf, ok := os.LookupEnv("CONTAINERS_CONF")
if ok {
if path, ok := os.LookupEnv("PATH"); ok {
env = append(env, fmt.Sprintf("PATH=%s", path))
}
if conf, ok := os.LookupEnv("CONTAINERS_CONF"); ok {
env = append(env, fmt.Sprintf("CONTAINERS_CONF=%s", conf))
}
if conf, ok := os.LookupEnv("CONTAINERS_HELPER_BINARY_DIR"); ok {
env = append(env, fmt.Sprintf("CONTAINERS_HELPER_BINARY_DIR=%s", conf))
}
env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir))
env = append(env, fmt.Sprintf("_CONTAINERS_USERNS_CONFIGURED=%s", os.Getenv("_CONTAINERS_USERNS_CONFIGURED")))
env = append(env, fmt.Sprintf("_CONTAINERS_ROOTLESS_UID=%s", os.Getenv("_CONTAINERS_ROOTLESS_UID")))
Expand Down

0 comments on commit 940d3d8

Please sign in to comment.