mirror of
https://github.com/containers/podman.git
synced 2025-05-22 17:46:52 +08:00
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> <MH: Fixed cherry-pick conflicts> Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:

committed by
Matthew Heon

parent
5dabff27db
commit
9f4afa1ea2
@ -7,6 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/containers/buildah/pkg/parse"
|
||||||
"github.com/containers/common/pkg/config"
|
"github.com/containers/common/pkg/config"
|
||||||
"github.com/containers/common/pkg/secrets"
|
"github.com/containers/common/pkg/secrets"
|
||||||
"github.com/containers/image/v5/manifest"
|
"github.com/containers/image/v5/manifest"
|
||||||
@ -268,8 +269,11 @@ func WithRegistriesConf(path string) RuntimeOption {
|
|||||||
return errors.Wrap(err, "error locating specified registries.conf")
|
return errors.Wrap(err, "error locating specified registries.conf")
|
||||||
}
|
}
|
||||||
if rt.imageContext == nil {
|
if rt.imageContext == nil {
|
||||||
rt.imageContext = &types.SystemContext{}
|
rt.imageContext = &types.SystemContext{
|
||||||
|
BigFilesTemporaryDir: parse.GetTempDir(),
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rt.imageContext.SystemRegistriesConfPath = path
|
rt.imageContext.SystemRegistriesConfPath = path
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/containers/buildah/pkg/parse"
|
||||||
"github.com/containers/common/libimage"
|
"github.com/containers/common/libimage"
|
||||||
"github.com/containers/common/pkg/config"
|
"github.com/containers/common/pkg/config"
|
||||||
"github.com/containers/image/v5/pkg/sysregistriesv2"
|
"github.com/containers/image/v5/pkg/sysregistriesv2"
|
||||||
@ -379,7 +380,9 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
|||||||
|
|
||||||
// Set up containers/image
|
// Set up containers/image
|
||||||
if runtime.imageContext == nil {
|
if runtime.imageContext == nil {
|
||||||
runtime.imageContext = &types.SystemContext{}
|
runtime.imageContext = &types.SystemContext{
|
||||||
|
BigFilesTemporaryDir: parse.GetTempDir(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
runtime.imageContext.SignaturePolicyPath = runtime.config.Engine.SignaturePolicyPath
|
runtime.imageContext.SignaturePolicyPath = runtime.config.Engine.SignaturePolicyPath
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user