Esempio n. 1
0
func overlay2Supported() bool {
	if !overlayFSSupported() {
		return false
	}

	daemonV, err := kernel.ParseRelease(daemonKernelVersion)
	if err != nil {
		return false
	}
	requiredV := kernel.VersionInfo{Kernel: 4}
	return kernel.CompareKernelVersion(*daemonV, requiredV) > -1

}
Esempio n. 2
0
			cmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "/bin/sh", "-c", "cat /proc/filesystems")
			out, err := cmd.CombinedOutput()
			if err != nil {
				return false
			}
			return bytes.Contains(out, []byte("overlay\n"))
		},
		"Test cannot be run without suppport for overlayfs",
	}
	overlay2Supported = testRequirement{
		func() bool {
			if !overlayFSSupported.Condition() {
				return false
			}

			daemonV, err := kernel.ParseRelease(daemonKernelVersion)
			if err != nil {
				return false
			}
			requiredV := kernel.VersionInfo{Kernel: 4}
			return kernel.CompareKernelVersion(*daemonV, requiredV) > -1

		},
		"Test cannot be run without overlay2 support (kernel 4.0+)",
	}
)

func init() {
	SysInfo = sysinfo.New(true)
}