oci: pass XDG_RUNTIME_DIR down to the OCI runtime

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #871
Approved by: mheon
This commit is contained in:
Giuseppe Scrivano 2018-06-01 13:08:53 +02:00 committed by Atomic Bot
parent 81a7095389
commit ca03627a80

View file

@ -302,6 +302,7 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string) (er
// 0, 1 and 2 are stdin, stdout and stderr
cmd.Env = append(r.conmonEnv, fmt.Sprintf("_OCI_SYNCPIPE=%d", 3))
cmd.Env = append(cmd.Env, fmt.Sprintf("_OCI_STARTPIPE=%d", 4))
cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", os.Getenv("XDG_RUNTIME_DIR")))
if notify, ok := os.LookupEnv("NOTIFY_SOCKET"); ok {
cmd.Env = append(cmd.Env, fmt.Sprintf("NOTIFY_SOCKET=%s", notify))
}