2017-04-24 13:28:21 -04:00
|
|
|
package system
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
2017-08-08 15:43:48 -04:00
|
|
|
// lcowSupported determines if Linux Containers on Windows are supported.
|
2017-04-24 13:28:21 -04:00
|
|
|
var lcowSupported = false
|
|
|
|
|
2017-09-14 15:29:42 -04:00
|
|
|
// InitLCOW sets whether LCOW is supported or not
|
2017-08-08 15:43:48 -04:00
|
|
|
// TODO @jhowardmsft.
|
|
|
|
// 1. Replace with RS3 RTM build number.
|
|
|
|
// 2. Remove the getenv check when image-store is coalesced as shouldn't be needed anymore.
|
2017-09-14 15:29:42 -04:00
|
|
|
func InitLCOW(experimental bool) {
|
2017-08-08 15:43:48 -04:00
|
|
|
v := GetOSVersion()
|
|
|
|
if experimental && v.Build > 16270 && os.Getenv("LCOW_SUPPORTED") != "" {
|
2017-04-24 13:28:21 -04:00
|
|
|
lcowSupported = true
|
|
|
|
}
|
|
|
|
}
|