From be42a31be48999703631ffc818d860d9c814cd98 Mon Sep 17 00:00:00 2001 From: Mason Malone Date: Tue, 19 Oct 2021 23:05:32 -0700 Subject: [PATCH] Update entrypoints for Node 17 --- 17/alpine3.12/docker-entrypoint.sh | 5 ++++- 17/alpine3.13/docker-entrypoint.sh | 5 ++++- 17/alpine3.14/docker-entrypoint.sh | 5 ++++- 17/bullseye-slim/docker-entrypoint.sh | 5 ++++- 17/bullseye/docker-entrypoint.sh | 5 ++++- 17/buster-slim/docker-entrypoint.sh | 5 ++++- 17/buster/docker-entrypoint.sh | 5 ++++- 17/stretch-slim/docker-entrypoint.sh | 5 ++++- 17/stretch/docker-entrypoint.sh | 5 ++++- 9 files changed, 36 insertions(+), 9 deletions(-) diff --git a/17/alpine3.12/docker-entrypoint.sh b/17/alpine3.12/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/alpine3.12/docker-entrypoint.sh +++ b/17/alpine3.12/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/alpine3.13/docker-entrypoint.sh b/17/alpine3.13/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/alpine3.13/docker-entrypoint.sh +++ b/17/alpine3.13/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/alpine3.14/docker-entrypoint.sh b/17/alpine3.14/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/alpine3.14/docker-entrypoint.sh +++ b/17/alpine3.14/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/bullseye-slim/docker-entrypoint.sh b/17/bullseye-slim/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/bullseye-slim/docker-entrypoint.sh +++ b/17/bullseye-slim/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/bullseye/docker-entrypoint.sh b/17/bullseye/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/bullseye/docker-entrypoint.sh +++ b/17/bullseye/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/buster-slim/docker-entrypoint.sh b/17/buster-slim/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/buster-slim/docker-entrypoint.sh +++ b/17/buster-slim/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/buster/docker-entrypoint.sh b/17/buster/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/buster/docker-entrypoint.sh +++ b/17/buster/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/stretch-slim/docker-entrypoint.sh b/17/stretch-slim/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/stretch-slim/docker-entrypoint.sh +++ b/17/stretch-slim/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi diff --git a/17/stretch/docker-entrypoint.sh b/17/stretch/docker-entrypoint.sh index de6fa8a9..1b3116e5 100755 --- a/17/stretch/docker-entrypoint.sh +++ b/17/stretch/docker-entrypoint.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then +# Run command with node if the first argument contains a "-" or is not a system command. The last +# part inside the "{}" is a workaround for the following bug in ash/dash: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then set -- node "$@" fi