diff --git a/helpers/ab-nginx.params.template b/helpers/ab-nginx.params.template index 060ee58..d661b29 100644 --- a/helpers/ab-nginx.params.template +++ b/helpers/ab-nginx.params.template @@ -17,10 +17,11 @@ # ensure the container can read and/or write to locations on the host or # has access to files shared between members of a container stack. # REQUIRED: NO -# DEFAULT: UID=8080, GID=8080 +# DEFAULT: NGINX_UID=8080, NGINX_GID=8080 # VALID OPTIONS: any permissible and available UID/GID value -#UID=8080 -#GID=8080 +#NGINX_UID=8080 +#NGINX_GID=8080 + # # Network options diff --git a/helpers/ab-nginx.sh b/helpers/ab-nginx.sh index 63b1985..f4dab7d 100644 --- a/helpers/ab-nginx.sh +++ b/helpers/ab-nginx.sh @@ -218,6 +218,7 @@ if [ -z "$SSL_CERT" ]; then # shellcheck disable=SC2086 docker run --rm -it --name "${container_name}" \ --env-file ab-nginx.params \ + --user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \ -e SERVER_NAMES="$HOSTNAMES" \ $vmount \ --network=${NETWORK} \ @@ -229,6 +230,7 @@ if [ -z "$SSL_CERT" ]; then # shellcheck disable=SC2086 docker run -d --name "${container_name}" \ --env-file ab-nginx.params \ + --user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \ -e SERVER_NAMES="$HOSTNAMES" \ $vmount \ --network=${NETWORK} \ @@ -247,6 +249,7 @@ else # shellcheck disable=SC2086 docker run --rm -it --name "${container_name}" \ --env-file ab-nginx.params \ + --user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \ -e SERVER_NAMES="$HOSTNAMES" \ $vmount \ --network=${NETWORK} \ @@ -264,6 +267,7 @@ else # shellcheck disable=SC2086 docker run -d --name "${container_name}" \ --env-file ab-nginx.params \ + --user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \ -e SERVER_NAMES="$HOSTNAMES" \ $vmount \ --network=${NETWORK} \