@@ -127,7 +127,21 @@ RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli
127127#
128128# bash-exec installation
129129 && printf '#!/bin/bash \n\n if [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \
130- && chmod +x /usr/bin/bash-exec \
130+ && chmod +x /usr/bin/bash-exec
131+
132+ #
133+ # pmd installation
134+ ARG PMD_VERSION=6.55.0
135+ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
136+ unzip pmd-bin-${PMD_VERSION}.zip && \
137+ rm pmd-bin-${PMD_VERSION}.zip && \
138+ mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
139+ chmod +x /usr/bin/pmd/bin/run.sh \
140+ #
141+ # ktlint installation
142+ && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
143+ chmod a+x ktlint && \
144+ mv "ktlint" /usr/bin/ \
131145#
132146# scalafix installation
133147 && ./coursier install scalafix --quiet --install-dir /usr/bin && rm -rf /root/.cache
@@ -242,6 +256,8 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
242256COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
243257COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
244258COPY --link --from=revive /usr/bin/revive /usr/bin/revive
259+ COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd
260+ COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
245261COPY --link --from=kubeconform /kubeconform /usr/bin/
246262COPY --link --from=chktex /usr/bin/chktex /usr/bin/
247263COPY --link --from=checkmake /checkmake /usr/bin/checkmake
@@ -507,7 +523,6 @@ ARG ARM_TTK_DIRECTORY='/opt/microsoft'
507523ARG BICEP_EXE='bicep'
508524ARG BICEP_DIR='/usr/local/bin'
509525ARG DART_VERSION='2.8.4'
510- ARG PMD_VERSION=6.55.0
511526ARG PSSA_VERSION='latest'
512527# ARG__END
513528
@@ -566,6 +581,8 @@ RUN apk add --no-cache \
566581 libc6-compat \
567582 openssl \
568583 readline-dev \
584+ lua \
585+ luarocks \
569586 g++ \
570587 libc-dev \
571588 libgcc \
@@ -877,39 +894,15 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \
877894 --output /usr/bin/checkstyle
878895
879896#
880- # pmd installation
881- RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
882- unzip pmd-bin-${PMD_VERSION}.zip && \
883- rm pmd-bin-${PMD_VERSION}.zip && \
884- mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
885- chmod +x /usr/bin/pmd/bin/run.sh \
886- #
887- # ktlint installation
888- && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
889- chmod a+x ktlint && \
890- mv "ktlint" /usr/bin/ \
891- #
892897# kubescape installation
893- && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
898+ RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
894899 curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \
895900#
896901# chktex installation
897902 && cd ~ && touch .chktexrc && cd / \
898903#
899904# luacheck installation
900- && wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - \
901- && cd lua-5.3.5 \
902- && make linux \
903- && make install \
904- && cd .. && rm -r lua-5.3.5/ \
905- && wget --tries=5 https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O - -q | tar -xzf - \
906- && cd luarocks-3.3.1-super-linter \
907- && ./configure --with-lua-include=/usr/local/include \
908- && make \
909- && make -b install \
910- && cd .. && rm -r luarocks-3.3.1-super-linter/ \
911905 && luarocks install luacheck \
912- && cd / \
913906#
914907# perlcritic installation
915908 && curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wget Perl::Critic
0 commit comments