From 9341eed39a6d033620713ed6f6c26651da6fbc6c Mon Sep 17 00:00:00 2001 From: Aaron Aichlmayr Date: Mon, 24 Jul 2023 08:20:15 -0500 Subject: [PATCH] Sped up the build a bit --- Dockerfile | 47 ++++++++----------- flavors/cupcake/Dockerfile | 32 +++++++------ flavors/documentation/Dockerfile | 15 +++--- flavors/dotnet/Dockerfile | 13 ++--- flavors/dotnetweb/Dockerfile | 13 ++--- flavors/go/Dockerfile | 13 ++--- flavors/java/Dockerfile | 32 +++++++------ flavors/javascript/Dockerfile | 15 +++--- flavors/php/Dockerfile | 15 +++--- flavors/python/Dockerfile | 15 +++--- flavors/ruby/Dockerfile | 15 +++--- flavors/rust/Dockerfile | 15 +++--- flavors/salesforce/Dockerfile | 13 ++--- flavors/swift/Dockerfile | 13 ++--- flavors/terraform/Dockerfile | 15 +++--- linters/java_pmd/Dockerfile | 20 ++++---- linters/kotlin_ktlint/Dockerfile | 12 ++--- linters/lua_luacheck/Dockerfile | 17 ++----- .../java.megalinter-descriptor.yml | 4 +- .../kotlin.megalinter-descriptor.yml | 4 +- .../descriptors/lua.megalinter-descriptor.yml | 17 ++----- 21 files changed, 175 insertions(+), 180 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1edc3674489..8e58a06d4c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -127,7 +127,21 @@ RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli # # bash-exec installation && printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec \ + && chmod +x /usr/bin/bash-exec + +# +# pmd installation +ARG PMD_VERSION=6.55.0 +RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ + unzip pmd-bin-${PMD_VERSION}.zip && \ + rm pmd-bin-${PMD_VERSION}.zip && \ + mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ + chmod +x /usr/bin/pmd/bin/run.sh \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ \ # # scalafix installation && ./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 COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter COPY --link --from=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=chktex /usr/bin/chktex /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake @@ -507,7 +523,6 @@ ARG ARM_TTK_DIRECTORY='/opt/microsoft' ARG BICEP_EXE='bicep' ARG BICEP_DIR='/usr/local/bin' ARG DART_VERSION='2.8.4' -ARG PMD_VERSION=6.55.0 ARG PSSA_VERSION='latest' #ARG__END @@ -566,6 +581,8 @@ RUN apk add --no-cache \ libc6-compat \ openssl \ readline-dev \ + lua \ + luarocks \ g++ \ libc-dev \ libgcc \ @@ -877,39 +894,15 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ --output /usr/bin/checkstyle # -# pmd installation -RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ - unzip pmd-bin-${PMD_VERSION}.zip && \ - rm pmd-bin-${PMD_VERSION}.zip && \ - mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ - chmod +x /usr/bin/pmd/bin/run.sh \ -# -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # chktex installation && cd ~ && touch .chktexrc && cd / \ # # luacheck installation - && wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - \ - && cd lua-5.3.5 \ - && make linux \ - && make install \ - && cd .. && rm -r lua-5.3.5/ \ - && wget --tries=5 https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O - -q | tar -xzf - \ - && cd luarocks-3.3.1-super-linter \ - && ./configure --with-lua-include=/usr/local/include \ - && make \ - && make -b install \ - && cd .. && rm -r luarocks-3.3.1-super-linter/ \ && luarocks install luacheck \ - && cd / \ # # perlcritic installation && curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wget Perl::Critic diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 2efa67a95af..921d78099c5 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -110,6 +110,20 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ && chmod +x /usr/bin/bash-exec +# +# pmd installation +ARG PMD_VERSION=6.55.0 +RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ + unzip pmd-bin-${PMD_VERSION}.zip && \ + rm pmd-bin-${PMD_VERSION}.zip && \ + mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ + chmod +x /usr/bin/pmd/bin/run.sh \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ + # #BUILD_PLATFORM_OTHER__END @@ -216,6 +230,8 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter COPY --link --from=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --chmod=755 --from=phpstan /composer/vendor/phpstan/phpstan/phpstan.phar /usr/bin/phpstan @@ -444,7 +460,7 @@ RUN apk add --update --no-cache libc6-compat \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START -ARG PMD_VERSION=6.55.0 + #ARG__END #################### @@ -661,20 +677,8 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ --output /usr/bin/checkstyle # -# pmd installation -RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ - unzip pmd-bin-${PMD_VERSION}.zip && \ - rm pmd-bin-${PMD_VERSION}.zip && \ - mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ - chmod +x /usr/bin/pmd/bin/run.sh \ -# -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 # diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 23b7fe8af4a..e492ccfd8af 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -131,6 +136,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -388,13 +394,8 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # grype installation diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 6023b6d8d08..f15f04151cf 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -134,6 +139,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -485,11 +491,6 @@ esac \ # csharpier installation && /usr/share/dotnet/dotnet tool install -g csharpier \ # -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index 9ad96892ce1..c994ac3678b 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -154,6 +159,7 @@ COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -505,11 +511,6 @@ esac \ # csharpier installation && /usr/share/dotnet/dotnet tool install -g csharpier \ # -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index fb983ac3811..802e44e2172 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -57,7 +57,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -146,6 +151,7 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter COPY --link --from=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -408,11 +414,6 @@ COPY --from=copy-collector / / RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \ && golangci-lint --version \ # -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 80c66dd063e..237a00ce3b0 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -45,6 +45,20 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ && chmod +x /usr/bin/bash-exec +# +# pmd installation +ARG PMD_VERSION=6.55.0 +RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ + unzip pmd-bin-${PMD_VERSION}.zip && \ + rm pmd-bin-${PMD_VERSION}.zip && \ + mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ + chmod +x /usr/bin/pmd/bin/run.sh \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ + # #BUILD_PLATFORM_OTHER__END @@ -131,6 +145,8 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -287,7 +303,7 @@ RUN apk add --update --no-cache libc6-compat \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START -ARG PMD_VERSION=6.55.0 + #ARG__END #################### @@ -458,20 +474,8 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ --output /usr/bin/checkstyle # -# pmd installation -RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ - unzip pmd-bin-${PMD_VERSION}.zip && \ - rm pmd-bin-${PMD_VERSION}.zip && \ - mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ - chmod +x /usr/bin/pmd/bin/run.sh \ -# -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # grype installation diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index fa173eb1601..3f2751d33be 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -42,7 +42,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -152,6 +157,7 @@ COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -408,13 +414,8 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # grype installation diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 057fae74618..8beeb7bcb75 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -131,6 +136,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --chmod=755 --from=phpstan /composer/vendor/phpstan/phpstan/phpstan.phar /usr/bin/phpstan COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -416,13 +422,8 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI && update-alternatives --install /usr/bin/php php /usr/bin/php81 110 # -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 # diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 95e83eed911..f786db1ea74 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -52,7 +52,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -140,6 +145,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=checkmake /checkmake /usr/bin/checkmake COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -472,13 +478,8 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 # diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 90ab3e7a23e..b7e0422909e 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -42,7 +42,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -130,6 +135,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -392,13 +398,8 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # grype installation diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 362a3382efd..b02adc78e04 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -79,7 +79,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -167,6 +172,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -428,13 +434,8 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # grype installation diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 1e97228a2fb..9d188f1303f 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -42,7 +42,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -133,6 +138,7 @@ COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -396,11 +402,6 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ && npm cache clean --force || true \ && rm -rf /root/.npm/_cacache \ # -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 341f001b5a0..510d9c12c42 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -42,7 +42,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -130,6 +135,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -389,11 +395,6 @@ COPY --from=copy-collector / / ############################################################################################# #OTHER__START RUN rc-update add docker boot && rc-service docker start || true \ -# ktlint installation - && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 4ea1f59e8c4..f0e58cdd300 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -48,7 +48,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_OTHER__START # bash-exec installation RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ - && chmod +x /usr/bin/bash-exec + && chmod +x /usr/bin/bash-exec \ +# +# ktlint installation + && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ # #BUILD_PLATFORM_OTHER__END @@ -136,6 +141,7 @@ COPY --link --from=node_modules /node-deps /node-deps COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -398,13 +404,8 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ \ -# # kubescape installation - && ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ +RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \ # # grype installation diff --git a/linters/java_pmd/Dockerfile b/linters/java_pmd/Dockerfile index 4761ce9597f..09a1cfd7b31 100644 --- a/linters/java_pmd/Dockerfile +++ b/linters/java_pmd/Dockerfile @@ -24,7 +24,15 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_APK__END #BUILD_PLATFORM_OTHER__START +# pmd installation +ARG PMD_VERSION=6.55.0 +RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ + unzip pmd-bin-${PMD_VERSION}.zip && \ + rm pmd-bin-${PMD_VERSION}.zip && \ + mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ + chmod +x /usr/bin/pmd/bin/run.sh +# #BUILD_PLATFORM_OTHER__END FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS node_modules @@ -54,7 +62,7 @@ FROM scratch AS copy-collector ############################################################################################# #COPY__START - +COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd #COPY__END ####################################### @@ -134,7 +142,7 @@ RUN apk add --update --no-cache libc6-compat \ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START -ARG PMD_VERSION=6.55.0 + #ARG__END #################### @@ -219,14 +227,6 @@ COPY --from=copy-collector / / # JAVA installation ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" -# -# pmd installation -RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ - unzip pmd-bin-${PMD_VERSION}.zip && \ - rm pmd-bin-${PMD_VERSION}.zip && \ - mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ - chmod +x /usr/bin/pmd/bin/run.sh - # #OTHER__END diff --git a/linters/kotlin_ktlint/Dockerfile b/linters/kotlin_ktlint/Dockerfile index 656a80ca205..29e2c883968 100644 --- a/linters/kotlin_ktlint/Dockerfile +++ b/linters/kotlin_ktlint/Dockerfile @@ -24,7 +24,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform #BUILD_PLATFORM_APK__END #BUILD_PLATFORM_OTHER__START +# ktlint installation +RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ + chmod a+x ktlint && \ + mv "ktlint" /usr/bin/ +# #BUILD_PLATFORM_OTHER__END FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS node_modules @@ -54,7 +59,7 @@ FROM scratch AS copy-collector ############################################################################################# #COPY__START - +COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint #COPY__END ####################################### @@ -216,12 +221,7 @@ COPY --from=copy-collector / / ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -# ktlint installation -RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ - chmod a+x ktlint && \ - mv "ktlint" /usr/bin/ -# #OTHER__END ########################### diff --git a/linters/lua_luacheck/Dockerfile b/linters/lua_luacheck/Dockerfile index 9b2f5913405..6243afdcf69 100644 --- a/linters/lua_luacheck/Dockerfile +++ b/linters/lua_luacheck/Dockerfile @@ -160,6 +160,8 @@ RUN apk add --no-cache \ openssh \ openssl \ readline-dev \ + lua \ + luarocks \ && git config --global core.autocrlf true #APK__END @@ -218,20 +220,7 @@ COPY --from=copy-collector / / ############################################################################################# #OTHER__START # luacheck installation -RUN wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - \ - && cd lua-5.3.5 \ - && make linux \ - && make install \ - && cd .. && rm -r lua-5.3.5/ \ - && wget --tries=5 https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O - -q | tar -xzf - \ - && cd luarocks-3.3.1-super-linter \ - && ./configure --with-lua-include=/usr/local/include \ - && make \ - && make -b install \ - && cd .. && rm -r luarocks-3.3.1-super-linter/ \ - && luarocks install luacheck \ - && cd / - +RUN luarocks install luacheck # #OTHER__END diff --git a/megalinter/descriptors/java.megalinter-descriptor.yml b/megalinter/descriptors/java.megalinter-descriptor.yml index c3ba5a3eb59..26de25365e3 100644 --- a/megalinter/descriptors/java.megalinter-descriptor.yml +++ b/megalinter/descriptors/java.megalinter-descriptor.yml @@ -99,7 +99,7 @@ linters: - "pmd --rulesets java-pmd-ruleset.xml --file-list /tmp/list-off-files-generated-by-megalinter.txt" - "pmd --rulesets java-pmd-ruleset.xml --dir /path/to/sources" install: - dockerfile: + build_platform_dockerfile: - ARG PMD_VERSION=6.55.0 - | RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \ @@ -107,6 +107,8 @@ linters: rm pmd-bin-${PMD_VERSION}.zip && \ mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \ chmod +x /usr/bin/pmd/bin/run.sh + dockerfile: + - COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd supported_platforms: platform: - linux/amd64 diff --git a/megalinter/descriptors/kotlin.megalinter-descriptor.yml b/megalinter/descriptors/kotlin.megalinter-descriptor.yml index 8791b017056..fc21f07eee6 100644 --- a/megalinter/descriptors/kotlin.megalinter-descriptor.yml +++ b/megalinter/descriptors/kotlin.megalinter-descriptor.yml @@ -25,11 +25,13 @@ linters: - "ktlint myfile.kt" - "ktlint --format myfile.kt" install: - dockerfile: + build_platform_dockerfile: - | RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ chmod a+x ktlint && \ mv "ktlint" /usr/bin/ + dockerfile: + - COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint supported_platforms: platform: - linux/amd64 diff --git a/megalinter/descriptors/lua.megalinter-descriptor.yml b/megalinter/descriptors/lua.megalinter-descriptor.yml index a7fdd91c6da..7386fdadaf1 100644 --- a/megalinter/descriptors/lua.megalinter-descriptor.yml +++ b/megalinter/descriptors/lua.megalinter-descriptor.yml @@ -20,21 +20,10 @@ linters: apk: - openssl - readline-dev + - lua + - luarocks dockerfile: - - | - RUN wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - \ - && cd lua-5.3.5 \ - && make linux \ - && make install \ - && cd .. && rm -r lua-5.3.5/ \ - && wget --tries=5 https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O - -q | tar -xzf - \ - && cd luarocks-3.3.1-super-linter \ - && ./configure --with-lua-include=/usr/local/include \ - && make \ - && make -b install \ - && cd .. && rm -r luarocks-3.3.1-super-linter/ \ - && luarocks install luacheck \ - && cd / + - RUN luarocks install luacheck supported_platforms: platform: - linux/amd64