瀏覽代碼

use xz compression when pushing images to the registry

This makes the xz compression the default.
unclejack 12 年之前
父節點
當前提交
0ddc6867fb
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      registry.go

+ 2 - 2
registry.go

@@ -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
 		// 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
 		// 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)
 		tmp, err := ioutil.ReadAll(layerData2)
 		if err != nil {
 		if err != nil {
 			return err
 			return err
 		}
 		}
 		layerLength := len(tmp)
 		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 {
 		if err != nil {
 			return fmt.Errorf("Failed to generate layer archive: %s", err)
 			return fmt.Errorf("Failed to generate layer archive: %s", err)
 		}
 		}