chrootarchive: propagate env from parent
propagate the environment variables from the current process since they are needed by pkg/unshare to read the UID for the user that created the user namespace (through the _CONTAINERS_ROOTLESS_UID env variable). Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
f0cd0b97b1
commit
9ecda58b2c
|
|
@ -110,7 +110,7 @@ func applyLayerHandler(dest string, layer io.Reader, options *archive.TarOptions
|
|||
|
||||
cmd := reexec.Command("storage-applyLayer", dest)
|
||||
cmd.Stdin = layer
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("OPT=%s", data))
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("OPT=%s", data))
|
||||
|
||||
outBuf, errBuf := new(bytes.Buffer), new(bytes.Buffer)
|
||||
cmd.Stdout, cmd.Stderr = outBuf, errBuf
|
||||
|
|
|
|||
Loading…
Reference in New Issue