Просмотр исходного кода

Fixed bug which caused AUFS layers to be mounted in the wrong order.

Solomon Hykes 12 лет назад
Родитель
Сommit
2dadcf9b81
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      filesystem.go
  2. 1 1
      image/image.go

+ 3 - 0
filesystem.go

@@ -15,6 +15,9 @@ import (
 type Filesystem struct {
 	RootFS string
 	RWPath string
+	// The layers to be mounted on top of each other via aufs.
+	// Layers are ordered top-to-bottom: the first layer in the list will be mounted on top of the others.
+	// In other words, THE BASE IMAGE SHOULD BE LAST!
 	Layers []string
 }
 

+ 1 - 1
image/image.go

@@ -49,7 +49,7 @@ func (store *Store) Import(name string, archive io.Reader, stderr io.Writer, par
 	}
 	layers := []string{layer}
 	if parent != nil {
-		layers = append(parent.Layers, layers...)
+		layers = append(layers, parent.Layers...)
 	}
 	var parentId string
 	if parent != nil {