func (r *RootFS) ChainID() layer.ChainID {
	if runtime.GOOS == "windows" && r.Type == typeLayersWithBase {
		logrus.Warnf("Layer type is unsupported on this platform. DiffIDs: '%v'", r.DiffIDs)
		return ""
	}
	return layer.CreateChainID(r.DiffIDs)
}
ChainID returns the ChainID for the top layer in RootFS.
package image
import (
	"runtime"
	"github.com/Sirupsen/logrus"
	"github.com/docker/docker/layer"
)
const TypeLayers = "layers"
const typeLayersWithBase = "layers+base"
type RootFS struct {
	Type    string         `json:"type"`
	DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`
}
func NewRootFS() *RootFS {
	return &RootFS{Type: TypeLayers}
}
func (r *RootFS) Append(id layer.DiffID) {
	r.DiffIDs = append(r.DiffIDs, id)
}