hostinfo: report when running in Docker Desktop.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
Denton Gentry 2021-11-21 21:32:39 -08:00 committed by Denton Gentry
parent ca1b3fe235
commit 1ea270375a

View File

@ -87,6 +87,7 @@ func packageType() string {
AWSFargate = EnvType("fg")
FlyDotIo = EnvType("fly")
Kubernetes = EnvType("k8s")
DockerDesktop = EnvType("dde")
)
var envType atomic.Value // of EnvType
@ -144,6 +145,9 @@ func getEnvType() EnvType {
if inKubernetes() {
return Kubernetes
}
if inDockerDesktop() {
return DockerDesktop
}
return ""
}
@ -228,6 +232,13 @@ func inKubernetes() bool {
return false
}
func inDockerDesktop() bool {
if os.Getenv("TS_HOST_ENV") == "dde" {
return true
}
return false
}
type etcAptSrcResult struct {
mod time.Time
disabled bool