summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 9de70da1b..dde81a59d 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -340,6 +340,14 @@ func makeRuntime(runtime *Runtime) error {
SignaturePolicyPath: runtime.config.SignaturePolicyPath,
}
+ // Create the tmpDir
+ if err := os.MkdirAll(runtime.config.TmpDir, 0751); err != nil {
+ // The directory is allowed to exist
+ if !os.IsExist(err) {
+ return errors.Wrapf(err, "error creating tmpdir %s", runtime.config.TmpDir)
+ }
+ }
+
// Make an OCI runtime to perform container operations
ociRuntime, err := newOCIRuntime("runc", runtime.ociRuntimePath,
runtime.conmonPath, runtime.config.ConmonEnvVars,