Skip to content

Commit 9897369

Browse files
committed
Updated entrypoints changed with the previous commit.
1 parent 34f8bab commit 9897369

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

mainline/alpine-perl/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

mainline/alpine-slim/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

mainline/alpine/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

mainline/debian-perl/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

mainline/debian/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

stable/alpine-perl/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

stable/alpine-slim/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

stable/alpine/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

stable/debian-perl/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

stable/debian/20-envsubst-on-templates.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)