kubenetworks/kubevpn

View on GitHub
pkg/util/container.go

Summary

Maintainability
A
0 mins
Test Coverage
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
}