diff --git a/docker/Dockerfile b/docker/Dockerfile index ea97892f1..da892c1e2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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"] diff --git a/runtime-checks.go b/runtime-checks.go index c9fd35419..402257845 100644 --- a/runtime-checks.go +++ b/runtime-checks.go @@ -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 }