Merge pull request #1068 from segrax/patch-1

Use OS provided temporary directory
This commit is contained in:
Hang Yan 2018-09-07 11:19:22 +08:00 committed by GitHub
commit a0cc04499b
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
}