add environment var to explicitly indicate containerized and allow running as root (#1327)

This commit is contained in:
matt robinson
2016-04-18 19:30:11 -04:00
committed by Harshavardhana
parent b47d722d8e
commit af907a35a9
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -41,6 +41,11 @@ func isContainerized() bool {
}
}
// Check if env var explicitly set
if allow := os.Getenv("ALLOW_CONTAINER_ROOT"); allow == "1" || strings.ToLower(allow) == "true" {
return true
}
/* Add checks for non-docker containers here. */
return false
}