File tree Expand file tree Collapse file tree 10 files changed +20
-10
lines changed Expand file tree Collapse file tree 10 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ auto_envsubst() {
1414 local template_dir=" ${NGINX_ENVSUBST_TEMPLATE_DIR:-/ etc/ nginx/ templates} "
1515 local suffix=" ${NGINX_ENVSUBST_TEMPLATE_SUFFIX:- .template} "
1616 local output_dir=" ${NGINX_ENVSUBST_OUTPUT_DIR:-/ etc/ nginx/ conf.d} "
17+ local filter=" ${NGINX_ENVSUBST_FILTER:- } "
1718
1819 local template defined_envs relative_path output_path subdir
19- defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c ' echo "$@ " | grep -oEm1 "^[^=]+" ' --) ) ;
20+ defined_envs=$( printf ' ${%s} ' $( xargs -0n1 -a /proc/self/environ sh -c " echo \"\$ @ \ " | grep -- \" ${filter} \" | grep - oEm1 \ " ^[^=]+\" " --) ) ;
2021 [ -d " $template_dir " ] || return 0
2122 if [ ! -w " $output_dir " ]; then
2223 entrypoint_log " $ME : ERROR: $template_dir exists, but $output_dir is not writable"
You can’t perform that action at this time.
0 commit comments