mountsFromNative only filters bind mount to transform from native container. Because native container shows all types of mounts, such as tmpfs, proc, sysfs.
(spMounts []specs.Mount)
| 751 | // mountsFromNative only filters bind mount to transform from native container. |
| 752 | // Because native container shows all types of mounts, such as tmpfs, proc, sysfs. |
| 753 | func mountsFromNative(spMounts []specs.Mount) []MountPoint { |
| 754 | mountpoints := make([]MountPoint, 0, len(spMounts)) |
| 755 | for _, m := range spMounts { |
| 756 | var mp MountPoint |
| 757 | if m.Type != "bind" { |
| 758 | continue |
| 759 | } |
| 760 | mp.Type = m.Type |
| 761 | mp.Source = m.Source |
| 762 | mp.Destination = m.Destination |
| 763 | mp.Mode = strings.Join(m.Options, ",") |
| 764 | mp.RW, mp.Propagation = ParseMountProperties(m.Options) |
| 765 | mountpoints = append(mountpoints, mp) |
| 766 | } |
| 767 | |
| 768 | return mountpoints |
| 769 | } |
| 770 | |
| 771 | func statusFromNative(x containerd.Status, labels map[string]string) string { |
| 772 | switch s := x.Status; s { |
no test coverage detected
searching dependent graphs…