isContainerized should look for /.dockerenv not /.dockerinit

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
master
Dave Henderson 9 years ago committed by Harshavardhana
parent af907a35a9
commit ff9a6b00cc
  1. 4
      runtime-checks.go

@ -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
}

Loading…
Cancel
Save