From f58c294274cb411c67a77390e0b7ec912b99fe11 Mon Sep 17 00:00:00 2001 From: "Thomas L. Kjeldsen" Date: Sat, 17 May 2025 17:08:18 +0200 Subject: [PATCH] Use the shell "test" command instead of "[" to avoid confusion with Dockerfile RUN-syntax --- integration/dockerfiles-with-context/issue-2075/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/dockerfiles-with-context/issue-2075/Dockerfile b/integration/dockerfiles-with-context/issue-2075/Dockerfile index 600bf7199..77d84008c 100644 --- a/integration/dockerfiles-with-context/issue-2075/Dockerfile +++ b/integration/dockerfiles-with-context/issue-2075/Dockerfile @@ -22,6 +22,7 @@ RUN \ ls -lh /usr/local/bin/myfile FROM base as final COPY --from=build ["/usr/local/bin/myfile", "/usr/local/bin/"] -RUN [ -u /usr/local/bin/myfile ] +# Test if file exists and its set-user-id bit is set +RUN test -u /usr/local/bin/myfile LABEL \ description="Testing setuid behavior in Kaniko"