mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
10 lines
210 B
Go
10 lines
210 B
Go
package util
|
|
|
|
import "os"
|
|
|
|
// RunningInContainer returns true if the current process runs from inside a docker container.
|
|
func RunningInContainer() bool {
|
|
_, err := os.Stat("/.dockerenv")
|
|
return err == nil
|
|
}
|