feature(helpers): change docker run cmd
- add user specification so UID/GID always specified - add container default values
This commit is contained in:
parent
e208d22664
commit
2e2c93b2b1
@ -17,10 +17,11 @@
|
|||||||
# ensure the container can read and/or write to locations on the host or
|
# 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.
|
# has access to files shared between members of a container stack.
|
||||||
# REQUIRED: NO
|
# REQUIRED: NO
|
||||||
# DEFAULT: UID=8080, GID=8080
|
# DEFAULT: NGINX_UID=8080, NGINX_GID=8080
|
||||||
# VALID OPTIONS: any permissible and available UID/GID value
|
# VALID OPTIONS: any permissible and available UID/GID value
|
||||||
#UID=8080
|
#NGINX_UID=8080
|
||||||
#GID=8080
|
#NGINX_GID=8080
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Network options
|
# Network options
|
||||||
|
@ -218,6 +218,7 @@ if [ -z "$SSL_CERT" ]; then
|
|||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run --rm -it --name "${container_name}" \
|
docker run --rm -it --name "${container_name}" \
|
||||||
--env-file ab-nginx.params \
|
--env-file ab-nginx.params \
|
||||||
|
--user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \
|
||||||
-e SERVER_NAMES="$HOSTNAMES" \
|
-e SERVER_NAMES="$HOSTNAMES" \
|
||||||
$vmount \
|
$vmount \
|
||||||
--network=${NETWORK} \
|
--network=${NETWORK} \
|
||||||
@ -229,6 +230,7 @@ if [ -z "$SSL_CERT" ]; then
|
|||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run -d --name "${container_name}" \
|
docker run -d --name "${container_name}" \
|
||||||
--env-file ab-nginx.params \
|
--env-file ab-nginx.params \
|
||||||
|
--user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \
|
||||||
-e SERVER_NAMES="$HOSTNAMES" \
|
-e SERVER_NAMES="$HOSTNAMES" \
|
||||||
$vmount \
|
$vmount \
|
||||||
--network=${NETWORK} \
|
--network=${NETWORK} \
|
||||||
@ -247,6 +249,7 @@ else
|
|||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run --rm -it --name "${container_name}" \
|
docker run --rm -it --name "${container_name}" \
|
||||||
--env-file ab-nginx.params \
|
--env-file ab-nginx.params \
|
||||||
|
--user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \
|
||||||
-e SERVER_NAMES="$HOSTNAMES" \
|
-e SERVER_NAMES="$HOSTNAMES" \
|
||||||
$vmount \
|
$vmount \
|
||||||
--network=${NETWORK} \
|
--network=${NETWORK} \
|
||||||
@ -264,6 +267,7 @@ else
|
|||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run -d --name "${container_name}" \
|
docker run -d --name "${container_name}" \
|
||||||
--env-file ab-nginx.params \
|
--env-file ab-nginx.params \
|
||||||
|
--user="${NGINX_UID:-8080}:${NGINX_GID:-8080}" \
|
||||||
-e SERVER_NAMES="$HOSTNAMES" \
|
-e SERVER_NAMES="$HOSTNAMES" \
|
||||||
$vmount \
|
$vmount \
|
||||||
--network=${NETWORK} \
|
--network=${NETWORK} \
|
||||||
|
Loading…
Reference in New Issue
Block a user