From be9baa1464cae8aa688bfc6b1f98f1a10d4c410f Mon Sep 17 00:00:00 2001 From: Philipp Dallig Date: Thu, 18 Jul 2019 18:19:50 +0200 Subject: [PATCH] Fix startup without MINIO_USERNAME and MINIO_GROUPNAME (#7944) --- dockerscripts/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerscripts/docker-entrypoint.sh b/dockerscripts/docker-entrypoint.sh index 831aa948b..faa4d5bff 100755 --- a/dockerscripts/docker-entrypoint.sh +++ b/dockerscripts/docker-entrypoint.sh @@ -52,7 +52,7 @@ docker_sse_encryption_env() { # su-exec to requested user, if service cannot run exec will fail. docker_switch_user() { - if [ -z "${MINIO_USERNAME}" ] || [ -z "${MINIO_GROUPNAME}" ]; then + if [ ! -z "${MINIO_USERNAME}" ] && [ ! -z "${MINIO_GROUPNAME}" ]; then addgroup -S "$MINIO_GROUPNAME" >/dev/null 2>&1 && \ adduser -S -G "$MINIO_GROUPNAME" "$MINIO_USERNAME" >/dev/null 2>&1