Sfoglia il codice sorgente

docker-call-close-archive-in-push-v2-image

pushV2Image() calls TarLayer() which returns an archive. One needs to
Close() the archive once done otherwise it will leave mounted devices
if devicemapper graph driver is being used.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Vivek Goyal 10 anni fa
parent
commit
064ff42d6d
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      graph/push.go

+ 2 - 0
graph/push.go

@@ -392,6 +392,8 @@ func (s *TagStore) pushV2Image(r *registry.Session, img *image.Image, endpoint *
 	if err != nil {
 		return err
 	}
+	defer arch.Close()
+
 	tf, err := s.graph.newTempFile()
 	if err != nil {
 		return err