mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 通过环境变量 RUN_IN_CONTAINER 判断是否在容器内启动 https://github.com/siyuan-note/siyuan/issues/5744
This commit is contained in:
parent
f628ac35f8
commit
710b2d633c
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue