From 36eb2b9f9da607639f695958649ca1827d5402cf Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Mon, 6 Jul 2015 17:31:06 -0700 Subject: [PATCH] Fix duplicate layers in manifest Currently the layer array is initialized with the first layer then the first layer is appened to the layer list. Adding the first layer twice causes the layer to appear twice in the manifest, making a duplicate push and pull attempt occur. Signed-off-by: Derek McGowan (github: dmcgowan) Upstream-commit: 35081ea4b6711b1cfccb67b0f0d691b7adc85ff6 Component: engine --- components/engine/graph/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/graph/push.go b/components/engine/graph/push.go index 404e4c4e56..82615ee0eb 100644 --- a/components/engine/graph/push.go +++ b/components/engine/graph/push.go @@ -349,7 +349,7 @@ func (s *TagStore) pushV2Repository(r *registry.Session, localRepo Repository, o } layersSeen := make(map[string]bool) - layers := []*image.Image{layer} + layers := []*image.Image{} for ; layer != nil; layer, err = s.graph.GetParent(layer) { if err != nil { return err