1
0
mirror of https://github.com/docker/cli.git synced 2026-01-22 03:22:01 +03:00

use xz compression when pushing images to the registry

This makes the xz compression the default.
Upstream-commit: 0ddc6867fb86d2539bb19034844ac8c2369060c1
Component: engine
This commit is contained in:
unclejack
2013-04-02 02:19:34 +03:00
parent c1d869bdb5
commit a700cb8847

View File

@@ -267,14 +267,14 @@ func (graph *Graph) PushImage(stdout io.Writer, imgOrig *Image, authConfig *auth
// FIXME: Don't do this :D. Check the S3 requierement and implement chunks of 5MB
// FIXME2: I won't stress it enough, DON'T DO THIS! very high priority
layerData2, err := Tar(path.Join(graph.Root, img.Id, "layer"), Gzip)
layerData2, err := Tar(path.Join(graph.Root, img.Id, "layer"), Xz)
tmp, err := ioutil.ReadAll(layerData2)
if err != nil {
return err
}
layerLength := len(tmp)
layerData, err := Tar(path.Join(graph.Root, img.Id, "layer"), Gzip)
layerData, err := Tar(path.Join(graph.Root, img.Id, "layer"), Xz)
if err != nil {
return fmt.Errorf("Failed to generate layer archive: %s", err)
}