summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-06-30 08:07:42 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-07-06 13:35:33 -0400
commit0c4a734353eb2d02d1baf16418068edfcdb505de (patch)
tree7cc07082d7a866b71fb4ca62f625254fc9e368c6 /cmd/podman
parent3405e4fb6899846ba00c25e2c643c6338f432a8f (diff)
downloadpodman-0c4a734353eb2d02d1baf16418068edfcdb505de.tar.gz
podman-0c4a734353eb2d02d1baf16418068edfcdb505de.tar.bz2
podman-0c4a734353eb2d02d1baf16418068edfcdb505de.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/podman')
-rw-r--r--cmd/podman/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 77cadc842..f3b1dcc5d 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -27,6 +27,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 {