Merge pull request #12429 from cdoern/scp

podman image scp never enter podman user NS
This commit is contained in:
OpenShift Merge Robot
2022-01-05 17:50:37 +01:00
committed by GitHub
15 changed files with 498 additions and 276 deletions

View File

@ -229,3 +229,12 @@ func MovePauseProcessToScope(pausePidPath string) {
}
}
}
// CreateSCPCommand takes an existing command, appends the given arguments and returns a configured podman command for image scp
func CreateSCPCommand(cmd *exec.Cmd, command []string) *exec.Cmd {
cmd.Args = append(cmd.Args, command...)
cmd.Env = os.Environ()
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
return cmd
}