mirror of
https://github.com/clearlinux/rkt.git
synced 2026-08-18 21:16:13 +00:00
Merge pull request #113 from kelseyhightower/gzip-compress-aci-files
actool: gzip application container image
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"archive/tar"
|
||||
"compress/gzip"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -122,15 +123,19 @@ func runBuild(args []string) (exit int) {
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
gw := gzip.NewWriter(fh)
|
||||
tr := tar.NewWriter(gw)
|
||||
|
||||
defer func() {
|
||||
tr.Close()
|
||||
gw.Close()
|
||||
fh.Close()
|
||||
if exit != 0 && !buildOverwrite {
|
||||
fh.Close()
|
||||
os.Remove(tgt)
|
||||
}
|
||||
}()
|
||||
|
||||
tr := tar.NewWriter(fh)
|
||||
|
||||
var aw aci.ArchiveWriter
|
||||
if buildFilesetName != "" {
|
||||
aw, err = aci.NewFilesetWriter(buildFilesetName, tr)
|
||||
|
||||
Reference in New Issue
Block a user