mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
add environment var to explicitly indicate containerized and allow running as root (#1327)
This commit is contained in:
parent
b47d722d8e
commit
af907a35a9
@ -5,4 +5,5 @@ ADD minio.dockerimage /minio
|
||||
ADD export /export
|
||||
EXPOSE 9000
|
||||
COPY start.sh /start.sh
|
||||
ENV ALLOW_CONTAINER_ROOT=1
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user