2018-02-05 21:05:59 +00:00
|
|
|
package system // import "github.com/docker/docker/pkg/system"
|
2017-08-08 19:43:48 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
2017-09-19 19:14:46 +00:00
|
|
|
// IsOSSupported determines if an operating system is supported by the host
|
|
|
|
func IsOSSupported(os string) bool {
|
2018-02-23 23:29:26 +00:00
|
|
|
if strings.EqualFold(runtime.GOOS, os) {
|
2017-09-19 19:14:46 +00:00
|
|
|
return true
|
|
|
|
}
|
2018-02-23 23:29:26 +00:00
|
|
|
if LCOWSupported() && strings.EqualFold(os, "linux") {
|
2017-09-19 19:14:46 +00:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|