From 0c151452c11ae8bf46cbae455d0634c9c39e47c9 Mon Sep 17 00:00:00 2001 From: Idriss Neumann Date: Fri, 24 Jun 2022 12:41:58 +0100 Subject: [PATCH] fix(kaniko): use eval in order to handle args containing spaces --- entrypoint.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 89f8f88..4915d8c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -75,6 +75,9 @@ else fi fi +# https://github.com/GoogleContainerTools/kaniko/issues/1803 +export IFS='' + export ARGS="$CACHE $CONTEXT $DOCKERFILE $TARGET $DESTINATION $INPUT_EXTRA_ARGS" cat </kaniko/.docker/config.json @@ -88,11 +91,11 @@ cat </kaniko/.docker/config.json } EOF -# https://github.com/GoogleContainerTools/kaniko/issues/1803 -export IFS='' - # https://github.com/GoogleContainerTools/kaniko/issues/1349 -/kaniko/executor --reproducible --force $ARGS +# https://github.com/GoogleContainerTools/kaniko/issues/1803 +kaniko_cmd="/kaniko/executor ${ARGS} --reproducible --force" +echo "Running kaniko command ${kaniko_cmd}" +eval "${kaniko_cmd}" if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then export DIGEST=$(cat digest)