mirror of
https://github.com/containers/podman.git
synced 2025-10-18 11:42:55 +08:00
rootlessport: honor ctr.runtime.config.TmpDir
Previously, rootlessport was using /var/tmp as the tmp dir. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@ -344,6 +344,7 @@ func (r *Runtime) setupRootlessPortMapping(ctr *Container, netnsPath string) (er
|
||||
NetNSPath: netnsPath,
|
||||
ExitFD: 3,
|
||||
ReadyFD: 4,
|
||||
TmpDir: ctr.runtime.config.TmpDir,
|
||||
}
|
||||
cfgJSON, err := json.Marshal(cfg)
|
||||
if err != nil {
|
||||
|
@ -46,6 +46,7 @@ type Config struct {
|
||||
NetNSPath string
|
||||
ExitFD int
|
||||
ReadyFD int
|
||||
TmpDir string
|
||||
}
|
||||
|
||||
func init() {
|
||||
@ -101,7 +102,7 @@ func parent() error {
|
||||
}
|
||||
|
||||
// create the parent driver
|
||||
stateDir, err := ioutil.TempDir("", "rootlessport")
|
||||
stateDir, err := ioutil.TempDir(cfg.TmpDir, "rootlessport")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user