isContainerized should look for /.dockerenv not /.dockerinit

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
Dave Henderson 2016-04-18 22:26:56 -04:00 committed by Harshavardhana
parent af907a35a9
commit ff9a6b00cc

View file

@ -29,8 +29,8 @@ import (
// isContainerized returns true if we are inside a containerized environment.
func isContainerized() bool {
// Docker containers contain ".dockerinit" at its root path.
if _, e := os.Stat("/.dockerinit"); e == nil {
// Docker containers contain ".dockerenv" at their root path.
if _, e := os.Stat("/.dockerenv"); e == nil {
return true
}