diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 308371d633..98a693b116 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -82,6 +82,13 @@ jobs: echo "Expected: \"${{ matrix.version }}\", Got: \"${image_node_version}\"" [ "${image_node_version}" == "${{ matrix.version }}" ] + - name: Verify entrypoint runs regular, non-executable files with node + run: | + tmp_file=$(mktemp) + echo 'console.log("success")' > "${tmp_file}" + output=$(docker run --rm -v "${tmp_file}:/app/index.js" node:${{ matrix.version }}-${{ matrix.variant }} app/index.js) + [ "${output}" = 'success' ] + - name: Test for npm run: docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version diff --git a/12/alpine3.11/docker-entrypoint.sh b/12/alpine3.11/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/alpine3.11/docker-entrypoint.sh +++ b/12/alpine3.11/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/12/alpine3.12/docker-entrypoint.sh b/12/alpine3.12/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/alpine3.12/docker-entrypoint.sh +++ b/12/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/12/alpine3.13/docker-entrypoint.sh b/12/alpine3.13/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/alpine3.13/docker-entrypoint.sh +++ b/12/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/12/alpine3.14/docker-entrypoint.sh b/12/alpine3.14/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/alpine3.14/docker-entrypoint.sh +++ b/12/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/12/bullseye-slim/docker-entrypoint.sh b/12/bullseye-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/bullseye-slim/docker-entrypoint.sh +++ b/12/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/12/bullseye/docker-entrypoint.sh b/12/bullseye/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/bullseye/docker-entrypoint.sh +++ b/12/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/12/buster-slim/docker-entrypoint.sh b/12/buster-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/buster-slim/docker-entrypoint.sh +++ b/12/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/12/buster/docker-entrypoint.sh b/12/buster/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/buster/docker-entrypoint.sh +++ b/12/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/12/stretch-slim/docker-entrypoint.sh b/12/stretch-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/stretch-slim/docker-entrypoint.sh +++ b/12/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/12/stretch/docker-entrypoint.sh b/12/stretch/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/12/stretch/docker-entrypoint.sh +++ b/12/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 diff --git a/14/alpine3.11/docker-entrypoint.sh b/14/alpine3.11/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/alpine3.11/docker-entrypoint.sh +++ b/14/alpine3.11/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/14/alpine3.12/docker-entrypoint.sh b/14/alpine3.12/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/alpine3.12/docker-entrypoint.sh +++ b/14/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/14/alpine3.13/docker-entrypoint.sh b/14/alpine3.13/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/alpine3.13/docker-entrypoint.sh +++ b/14/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/14/alpine3.14/docker-entrypoint.sh b/14/alpine3.14/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/alpine3.14/docker-entrypoint.sh +++ b/14/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/14/bullseye-slim/docker-entrypoint.sh b/14/bullseye-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/bullseye-slim/docker-entrypoint.sh +++ b/14/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/14/bullseye/docker-entrypoint.sh b/14/bullseye/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/bullseye/docker-entrypoint.sh +++ b/14/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/14/buster-slim/docker-entrypoint.sh b/14/buster-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/buster-slim/docker-entrypoint.sh +++ b/14/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/14/buster/docker-entrypoint.sh b/14/buster/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/buster/docker-entrypoint.sh +++ b/14/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/14/stretch-slim/docker-entrypoint.sh b/14/stretch-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/stretch-slim/docker-entrypoint.sh +++ b/14/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/14/stretch/docker-entrypoint.sh b/14/stretch/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/14/stretch/docker-entrypoint.sh +++ b/14/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 diff --git a/16/alpine3.11/docker-entrypoint.sh b/16/alpine3.11/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/alpine3.11/docker-entrypoint.sh +++ b/16/alpine3.11/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/16/alpine3.12/docker-entrypoint.sh b/16/alpine3.12/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/alpine3.12/docker-entrypoint.sh +++ b/16/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/16/alpine3.13/docker-entrypoint.sh b/16/alpine3.13/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/alpine3.13/docker-entrypoint.sh +++ b/16/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/16/alpine3.14/docker-entrypoint.sh b/16/alpine3.14/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/alpine3.14/docker-entrypoint.sh +++ b/16/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/16/bullseye-slim/docker-entrypoint.sh b/16/bullseye-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/bullseye-slim/docker-entrypoint.sh +++ b/16/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/16/bullseye/docker-entrypoint.sh b/16/bullseye/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/bullseye/docker-entrypoint.sh +++ b/16/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/16/buster-slim/docker-entrypoint.sh b/16/buster-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/buster-slim/docker-entrypoint.sh +++ b/16/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/16/buster/docker-entrypoint.sh b/16/buster/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/buster/docker-entrypoint.sh +++ b/16/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/16/stretch-slim/docker-entrypoint.sh b/16/stretch-slim/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/stretch-slim/docker-entrypoint.sh +++ b/16/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/16/stretch/docker-entrypoint.sh b/16/stretch/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/16/stretch/docker-entrypoint.sh +++ b/16/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 diff --git a/17/alpine3.12/docker-entrypoint.sh b/17/alpine3.12/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 de6fa8a9ad..1b3116e53b 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 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index de6fa8a9ad..1b3116e53b 100755 --- a/docker-entrypoint.sh +++ b/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