rootfs_unix.go 532 B

123456789101112131415161718
  1. // +build !windows
  2. package image
  3. import "github.com/docker/docker/layer"
  4. // RootFS describes images root filesystem
  5. // This is currently a placeholder that only supports layers. In the future
  6. // this can be made into an interface that supports different implementations.
  7. type RootFS struct {
  8. Type string `json:"type"`
  9. DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`
  10. }
  11. // ChainID returns the ChainID for the top layer in RootFS.
  12. func (r *RootFS) ChainID() layer.ChainID {
  13. return layer.CreateChainID(r.DiffIDs)
  14. }