Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 通过环境变量 `RUN_IN_CONTAINER` 判断是否在容器内启动 https://github.com/siyuan-note/siyuan/issues/5744

Liang Ding710b2d633c25
diff --git a/kernel/util/path.go b/kernel/util/path.go
index c110e4e74c..05b72b07f4 100644
--- a/kernel/util/path.go
+++ b/kernel/util/path.go
@@ -112,6 +112,9 @@ func GetLocalIPs() (ret []string) {
}
func isRunningInDockerContainer() bool {
+ if _, runInContainer := os.LookupEnv("RUN_IN_CONTAINER"); runInContainer {
+ return true
+ }
if _, err := os.Stat("/.dockerenv"); err == nil {
return true
}