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