mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 20:20:25 +03:00
add environment var to explicitly indicate containerized and allow running as root (#1327)
This commit is contained in:
committed by
Harshavardhana
parent
b47d722d8e
commit
af907a35a9
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user