ソースを参照

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 年 前
コミット
064ff42d6d
1 ファイル変更2 行追加0 行削除
  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 {
 	if err != nil {
 		return err
 		return err
 	}
 	}
+	defer arch.Close()
+
 	tf, err := s.graph.newTempFile()
 	tf, err := s.graph.newTempFile()
 	if err != nil {
 	if err != nil {
 		return err
 		return err