summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-06-18 17:27:39 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-06-18 19:53:24 -0400
commit7864108ff191e2d78666fb5bdf098d295b7bae59 (patch)
tree56fe4fb719b4559a74ee15c23f6419e1368bab5f /libpod
parent48db8d9868ecbb1523f5b4b69815d16a19afa36f (diff)
downloadpodman-7864108ff191e2d78666fb5bdf098d295b7bae59.tar.gz
podman-7864108ff191e2d78666fb5bdf098d295b7bae59.tar.bz2
podman-7864108ff191e2d78666fb5bdf098d295b7bae59.zip
fix systemcontext to use correct TMPDIR
Users are complaining about read/only /var/tmp failing even if TMPDIR=/tmp is set. This PR Fixes: https://github.com/containers/podman/issues/10698 [NO TESTS NEEDED] No way to test this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/options.go6
-rw-r--r--libpod/runtime.go5
2 files changed, 9 insertions, 2 deletions
diff --git a/libpod/options.go b/libpod/options.go
index d3be46ad8..f2468e41b 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -7,6 +7,7 @@ import (
"strings"
"syscall"
+ "github.com/containers/buildah/pkg/parse"
"github.com/containers/common/pkg/config"
"github.com/containers/common/pkg/secrets"
"github.com/containers/image/v5/manifest"
@@ -268,8 +269,11 @@ func WithRegistriesConf(path string) RuntimeOption {
return errors.Wrap(err, "error locating specified registries.conf")
}
if rt.imageContext == nil {
- rt.imageContext = &types.SystemContext{}
+ rt.imageContext = &types.SystemContext{
+ BigFilesTemporaryDir: parse.GetTempDir(),
+ }
}
+
rt.imageContext.SystemRegistriesConfPath = path
return nil
}
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d775b55e1..84649bf3e 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -15,6 +15,7 @@ import (
"syscall"
"time"
+ "github.com/containers/buildah/pkg/parse"
"github.com/containers/common/libimage"
"github.com/containers/common/pkg/config"
"github.com/containers/common/pkg/defaultnet"
@@ -381,7 +382,9 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
// Set up containers/image
if runtime.imageContext == nil {
- runtime.imageContext = &types.SystemContext{}
+ runtime.imageContext = &types.SystemContext{
+ BigFilesTemporaryDir: parse.GetTempDir(),
+ }
}
runtime.imageContext.SignaturePolicyPath = runtime.config.Engine.SignaturePolicyPath