Skip to content

Node: fix: docker-entrypoint.sh file handling, closes #1456 #11157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

nodejs-github-bot
Copy link
Contributor

@github-actions
Copy link

Diff for bc064d3:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 2ae0890..efad761 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -4,195 +4,195 @@ GitFetch: refs/heads/main
 
 Tags: 12, 12-stretch, 12.22, 12.22-stretch, 12.22.7, 12.22.7-stretch, erbium, erbium-stretch
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/stretch
 
 Tags: 12-alpine, 12-alpine3.11, 12.22-alpine, 12.22-alpine3.11, 12.22.7-alpine, 12.22.7-alpine3.11, erbium-alpine, erbium-alpine3.11
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/alpine3.11
 
 Tags: 12-alpine3.12, 12.22-alpine3.12, 12.22.7-alpine3.12, erbium-alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/alpine3.12
 
 Tags: 12-alpine3.13, 12.22-alpine3.13, 12.22.7-alpine3.13, erbium-alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/alpine3.13
 
 Tags: 12-alpine3.14, 12.22-alpine3.14, 12.22.7-alpine3.14, erbium-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/alpine3.14
 
 Tags: 12-bullseye, 12.22-bullseye, 12.22.7-bullseye, erbium-bullseye
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/bullseye
 
 Tags: 12-bullseye-slim, 12.22-bullseye-slim, 12.22.7-bullseye-slim, erbium-bullseye-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/bullseye-slim
 
 Tags: 12-buster, 12.22-buster, 12.22.7-buster, erbium-buster
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/buster
 
 Tags: 12-buster-slim, 12.22-buster-slim, 12.22.7-buster-slim, erbium-buster-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/buster-slim
 
 Tags: 12-slim, 12-stretch-slim, 12.22-slim, 12.22-stretch-slim, 12.22.7-slim, 12.22.7-stretch-slim, erbium-slim, erbium-stretch-slim
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 12/stretch-slim
 
 Tags: 14, 14-stretch, 14.18, 14.18-stretch, 14.18.1, 14.18.1-stretch, fermium, fermium-stretch, lts, lts-fermium, lts-stretch
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/stretch
 
 Tags: 14-alpine, 14-alpine3.11, 14.18-alpine, 14.18-alpine3.11, 14.18.1-alpine, 14.18.1-alpine3.11, fermium-alpine, fermium-alpine3.11, lts-alpine, lts-alpine3.11
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/alpine3.11
 
 Tags: 14-alpine3.12, 14.18-alpine3.12, 14.18.1-alpine3.12, fermium-alpine3.12, lts-alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/alpine3.12
 
 Tags: 14-alpine3.13, 14.18-alpine3.13, 14.18.1-alpine3.13, fermium-alpine3.13, lts-alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/alpine3.13
 
 Tags: 14-alpine3.14, 14.18-alpine3.14, 14.18.1-alpine3.14, fermium-alpine3.14, lts-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/alpine3.14
 
 Tags: 14-bullseye, 14.18-bullseye, 14.18.1-bullseye, fermium-bullseye, lts-bullseye
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/bullseye
 
 Tags: 14-bullseye-slim, 14.18-bullseye-slim, 14.18.1-bullseye-slim, fermium-bullseye-slim, lts-bullseye-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/bullseye-slim
 
 Tags: 14-buster, 14.18-buster, 14.18.1-buster, fermium-buster, lts-buster
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/buster
 
 Tags: 14-buster-slim, 14.18-buster-slim, 14.18.1-buster-slim, fermium-buster-slim, lts-buster-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/buster-slim
 
 Tags: 14-slim, 14-stretch-slim, 14.18-slim, 14.18-stretch-slim, 14.18.1-slim, 14.18.1-stretch-slim, fermium-slim, fermium-stretch-slim, lts-slim, lts-stretch-slim
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: a70c43d47528213ef0cd58af7c35edf4c1d3e990
+GitCommit: 3101ce6b5b3a0308b58d464eef141e0043c3bf5b
 Directory: 14/stretch-slim
 
 Tags: 16, 16-buster, 16.12, 16.12-buster, 16.12.0, 16.12.0-buster, buster, current, current-buster, latest
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/buster
 
 Tags: 16-alpine, 16-alpine3.13, 16.12-alpine, 16.12-alpine3.13, 16.12.0-alpine, 16.12.0-alpine3.13, alpine, alpine3.13, current-alpine, current-alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/alpine3.13
 
 Tags: 16-alpine3.11, 16.12-alpine3.11, 16.12.0-alpine3.11, alpine3.11, current-alpine3.11
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/alpine3.11
 
 Tags: 16-alpine3.12, 16.12-alpine3.12, 16.12.0-alpine3.12, alpine3.12, current-alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/alpine3.12
 
 Tags: 16-alpine3.14, 16.12-alpine3.14, 16.12.0-alpine3.14, alpine3.14, current-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/alpine3.14
 
 Tags: 16-bullseye, 16.12-bullseye, 16.12.0-bullseye, bullseye, current-bullseye
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/bullseye
 
 Tags: 16-bullseye-slim, 16.12-bullseye-slim, 16.12.0-bullseye-slim, bullseye-slim, current-bullseye-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/bullseye-slim
 
 Tags: 16-buster-slim, 16-slim, 16.12-buster-slim, 16.12-slim, 16.12.0-buster-slim, 16.12.0-slim, buster-slim, current-buster-slim, current-slim, slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/buster-slim
 
 Tags: 16-stretch, 16.12-stretch, 16.12.0-stretch, current-stretch, stretch
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/stretch
 
 Tags: 16-stretch-slim, 16.12-stretch-slim, 16.12.0-stretch-slim, current-stretch-slim, stretch-slim
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 9dffc9162377d76ffd6c5b28b68b30c389fa15ab
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 16/stretch-slim
 
 Tags: 17, 17-bullseye, 17.0, 17.0-bullseye, 17.0.1, 17.0.1-bullseye
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/bullseye
 
 Tags: 17-alpine, 17-alpine3.14, 17.0-alpine, 17.0-alpine3.14, 17.0.1-alpine, 17.0.1-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/alpine3.14
 
 Tags: 17-alpine3.12, 17.0-alpine3.12, 17.0.1-alpine3.12
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/alpine3.12
 
 Tags: 17-alpine3.13, 17.0-alpine3.13, 17.0.1-alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/alpine3.13
 
 Tags: 17-bullseye-slim, 17-slim, 17.0-bullseye-slim, 17.0-slim, 17.0.1-bullseye-slim, 17.0.1-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/bullseye-slim
 
 Tags: 17-buster, 17.0-buster, 17.0.1-buster
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/buster
 
 Tags: 17-buster-slim, 17.0-buster-slim, 17.0.1-buster-slim
 Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/buster-slim
 
 Tags: 17-stretch, 17.0-stretch, 17.0.1-stretch
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/stretch
 
 Tags: 17-stretch-slim, 17.0-stretch-slim, 17.0.1-stretch-slim
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: eeed4a818e7cd954dbd4fff34de1afb8555b834f
+GitCommit: cbbf60da587a7ca135b573f4c05810d88f04ace7
 Directory: 17/stretch-slim
diff --git a/node_17.0.1-alpine3.12/docker-entrypoint.sh b/node_17.0.1-alpine3.12/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-alpine3.12/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-alpine3.13/docker-entrypoint.sh b/node_17.0.1-alpine3.13/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-alpine3.13/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-alpine3.14/docker-entrypoint.sh b/node_17.0.1-alpine3.14/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-alpine3.14/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-bullseye/docker-entrypoint.sh b/node_17.0.1-bullseye/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-bullseye/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-buster-slim/docker-entrypoint.sh b/node_17.0.1-buster-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-buster-slim/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-buster/docker-entrypoint.sh b/node_17.0.1-buster/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-buster/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-slim/docker-entrypoint.sh b/node_17.0.1-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-slim/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-stretch-slim/docker-entrypoint.sh b/node_17.0.1-stretch-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-stretch-slim/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_17.0.1-stretch/docker-entrypoint.sh b/node_17.0.1-stretch/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_17.0.1-stretch/docker-entrypoint.sh
+++ b/node_17.0.1-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/node_current-alpine3.11/docker-entrypoint.sh b/node_current-alpine3.11/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_current-alpine3.11/docker-entrypoint.sh
+++ b/node_current-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/node_current-alpine3.12/docker-entrypoint.sh b/node_current-alpine3.12/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_current-alpine3.12/docker-entrypoint.sh
+++ b/node_current-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/node_current-alpine3.13/docker-entrypoint.sh b/node_current-alpine3.13/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_current-alpine3.13/docker-entrypoint.sh
+++ b/node_current-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/node_current-alpine3.14/docker-entrypoint.sh b/node_current-alpine3.14/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_current-alpine3.14/docker-entrypoint.sh
+++ b/node_current-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/node_current-bullseye-slim/docker-entrypoint.sh b/node_current-bullseye-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_current-bullseye-slim/docker-entrypoint.sh
+++ b/node_current-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/node_current-bullseye/docker-entrypoint.sh b/node_current-bullseye/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_current-bullseye/docker-entrypoint.sh
+++ b/node_current-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/node_erbium-alpine3.11/docker-entrypoint.sh b/node_erbium-alpine3.11/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-alpine3.11/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-alpine3.12/docker-entrypoint.sh b/node_erbium-alpine3.12/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-alpine3.12/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-alpine3.13/docker-entrypoint.sh b/node_erbium-alpine3.13/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-alpine3.13/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-alpine3.14/docker-entrypoint.sh b/node_erbium-alpine3.14/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-alpine3.14/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-bullseye-slim/docker-entrypoint.sh b/node_erbium-bullseye-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-bullseye-slim/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-bullseye/docker-entrypoint.sh b/node_erbium-bullseye/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-bullseye/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-buster-slim/docker-entrypoint.sh b/node_erbium-buster-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-buster-slim/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-buster/docker-entrypoint.sh b/node_erbium-buster/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-buster/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-stretch-slim/docker-entrypoint.sh b/node_erbium-stretch-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-stretch-slim/docker-entrypoint.sh
+++ b/node_erbium-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/node_erbium-stretch/docker-entrypoint.sh b/node_erbium-stretch/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_erbium-stretch/docker-entrypoint.sh
+++ b/node_erbium-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/node_latest/docker-entrypoint.sh b/node_latest/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_latest/docker-entrypoint.sh
+++ b/node_latest/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/node_lts-alpine3.11/docker-entrypoint.sh b/node_lts-alpine3.11/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-alpine3.11/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-alpine3.12/docker-entrypoint.sh b/node_lts-alpine3.12/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-alpine3.12/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-alpine3.13/docker-entrypoint.sh b/node_lts-alpine3.13/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-alpine3.13/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-alpine3.14/docker-entrypoint.sh b/node_lts-alpine3.14/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-alpine3.14/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-bullseye-slim/docker-entrypoint.sh b/node_lts-bullseye-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-bullseye-slim/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-bullseye/docker-entrypoint.sh b/node_lts-bullseye/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-bullseye/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-buster-slim/docker-entrypoint.sh b/node_lts-buster-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-buster-slim/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-buster/docker-entrypoint.sh b/node_lts-buster/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-buster/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-stretch-slim/docker-entrypoint.sh b/node_lts-stretch-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-stretch-slim/docker-entrypoint.sh
+++ b/node_lts-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/node_lts-stretch/docker-entrypoint.sh b/node_lts-stretch/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_lts-stretch/docker-entrypoint.sh
+++ b/node_lts-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/node_slim/docker-entrypoint.sh b/node_slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_slim/docker-entrypoint.sh
+++ b/node_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/node_stretch-slim/docker-entrypoint.sh b/node_stretch-slim/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_stretch-slim/docker-entrypoint.sh
+++ b/node_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/node_stretch/docker-entrypoint.sh b/node_stretch/docker-entrypoint.sh
index de6fa8a..1b3116e 100755
--- a/node_stretch/docker-entrypoint.sh
+++ b/node_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

Relevant Maintainers:

@tianon tianon merged commit 6f9e4a4 into docker-library:master Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants