From dabd6b0e55278a41716cebf4a8bdc0b0f52966ad Mon Sep 17 00:00:00 2001 From: Davis Goodin Date: Thu, 29 Feb 2024 14:51:16 -0800 Subject: [PATCH] Remove unnecessary permission, fix Windows build Signed-off-by: Davis Goodin --- .gitattributes | 5 +++++ Dockerfile | 2 +- entrypoint.sh | 0 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .gitattributes mode change 100755 => 100644 entrypoint.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..620cec0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Always use LF for shell scripts. Building the Docker image in a Git clone on +# Windows with autocrlf enabled would otherwise make a faulty image: the +# entrypoint script would fail to run in the container. The CR at the end of +# "#!/bin/bash" causes Linux to be unable to start the script. +*.sh text eol=lf diff --git a/Dockerfile b/Dockerfile index dda683e..1639b88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,6 @@ COPY --from=rulesets /rulesets/default/generated /opt/rulesets COPY --from=rulesets /windup-rulesets/rules/rules-reviewed/openrewrite /opt/openrewrite COPY --from=static-report /usr/bin/js-bundle-generator /usr/local/bin COPY --from=static-report /usr/local/static-report /usr/local/static-report -COPY entrypoint.sh /usr/bin/entrypoint.sh +COPY --chmod=755 entrypoint.sh /usr/bin/entrypoint.sh ENTRYPOINT ["kantra"] diff --git a/entrypoint.sh b/entrypoint.sh old mode 100755 new mode 100644