Use OS provided temporary directory

Fix for #966
This commit is contained in:
Robert Crossfield 2018-09-07 10:56:36 +10:00 committed by GitHub
parent 0252213efb
commit a788ab7a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ func (c *Build) BuildImage(source string, image string, dockerfile string) error
log.Infof("Building image '%s' from directory '%s'", image, path.Base(source))
// Create a temporary file for tarball image packaging
tmpFile, err := ioutil.TempFile("/tmp", "kompose-image-build-")
tmpFile, err := ioutil.TempFile(os.TempDir(), "kompose-image-build-")
if err != nil {
return err
}