diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-30 08:07:42 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-30 08:08:57 -0400 |
commit | 565688d7824c2ac26f7da620a419b34c9fe7aa59 (patch) | |
tree | 572ba2c3c6386417cea79eedb63602dfc7d033a4 /cmd | |
parent | b163ec35d0d42423c274019cb41013d558d6f822 (diff) | |
download | podman-565688d7824c2ac26f7da620a419b34c9fe7aa59.tar.gz podman-565688d7824c2ac26f7da620a419b34c9fe7aa59.tar.bz2 podman-565688d7824c2ac26f7da620a419b34c9fe7aa59.zip |
Set TMPDIR to /var/tmp by default if not set
Containers/image will use TMPDIR for the location of pulled layer blobs.
If TMPDIR is not set, it will use /tmp. Since this is known to be of
limited space on most systems, we change the default to /var/tmp
if the user has not told the tools where to store temporary files.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/main.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 7a015b300..636538131 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -29,6 +29,11 @@ func main() { return } + // Hard code TMPDIR functions to use /var/tmp, if user did not override + if _, ok := os.LookupEnv("TMPDIR"); !ok { + os.Setenv("TMPDIR", "/var/tmp") + } + cfg := registry.PodmanConfig() for _, c := range registry.Commands { for _, m := range c.Mode { |