github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/system/init_windows.go (about) 1 package system // import "github.com/demonoid81/moby/pkg/system" 2 3 import ( 4 "os" 5 6 "github.com/sirupsen/logrus" 7 ) 8 9 var ( 10 // containerdRuntimeSupported determines if ContainerD should be the runtime. 11 // As of March 2019, this is an experimental feature. 12 containerdRuntimeSupported = false 13 ) 14 15 // InitContainerdRuntime sets whether to use ContainerD for runtime 16 // on Windows. This is an experimental feature still in development, and 17 // also requires an environment variable to be set (so as not to turn the 18 // feature on from simply experimental which would also mean LCOW. 19 func InitContainerdRuntime(experimental bool, cdPath string) { 20 if experimental && len(cdPath) > 0 && len(os.Getenv("DOCKER_WINDOWS_CONTAINERD_RUNTIME")) > 0 { 21 logrus.Warnf("Using ContainerD runtime. This feature is experimental") 22 containerdRuntimeSupported = true 23 } 24 } 25 26 // ContainerdRuntimeSupported returns true if the use of ContainerD runtime is supported. 27 func ContainerdRuntimeSupported() bool { 28 return containerdRuntimeSupported 29 }