hostinfo: report when running in Docker Desktop.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
pull/3390/head
Denton Gentry 3 years ago committed by Denton Gentry
parent ca1b3fe235
commit 1ea270375a

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

Loading…
Cancel
Save