mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 11:05:45 +00:00
hostinfo: report when running in Docker Desktop.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
parent
ca1b3fe235
commit
1ea270375a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user