From ddd9fba26d6dc1e80764d980c55ce32fd16d6869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 6 Feb 2023 02:55:55 +0000 Subject: [PATCH 01/18] Install revive from ghcr docker binary --- Dockerfile | 4 +++- flavors/cupcake/Dockerfile | 4 +++- flavors/cupcake/flavor.json | 1 - flavors/go/Dockerfile | 4 +++- flavors/go/flavor.json | 1 - linters/go_revive/Dockerfile | 7 +++---- megalinter/descriptors/all_flavors.json | 2 -- megalinter/descriptors/go.megalinter-descriptor.yml | 6 ++---- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index b648d41cbb8..a578a5cb596 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM ghcr.io/mgechev/revive:1.2.5 as revive FROM ghcr.io/assignuser/chktex-alpine:latest as chktex FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks @@ -283,6 +284,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=chktex /usr/bin/chktex /usr/bin/ COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -441,7 +443,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && golangci-lint --version \ # revive installation - && go install github.com/mgechev/revive@latest && go clean --cache +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 9c24ea9bce9..0941e572fbb 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -14,6 +14,7 @@ FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM ghcr.io/mgechev/revive:1.2.5 as revive FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan @@ -245,6 +246,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ COPY --from=terrascan /go/bin/terrascan /usr/bin/ @@ -318,7 +320,7 @@ RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --c && golangci-lint --version \ # revive installation - && go install github.com/mgechev/revive@latest && go clean --cache +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ diff --git a/flavors/cupcake/flavor.json b/flavors/cupcake/flavor.json index 74b5370a340..89181ead182 100644 --- a/flavors/cupcake/flavor.json +++ b/flavors/cupcake/flavor.json @@ -2,7 +2,6 @@ "descriptors": [ "ACTION", "BASH", - "GO", "JAVA", "KOTLIN", "PHP", diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 250a480259a..4106712aa3b 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -14,6 +14,7 @@ FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM ghcr.io/mgechev/revive:1.2.5 as revive FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -194,6 +195,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -234,7 +236,7 @@ RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --c && golangci-lint --version \ # revive installation - && go install github.com/mgechev/revive@latest && go clean --cache \ +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive # ktlint installation && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ diff --git a/flavors/go/flavor.json b/flavors/go/flavor.json index 31c64cf0cb0..148017a4d50 100644 --- a/flavors/go/flavor.json +++ b/flavors/go/flavor.json @@ -2,7 +2,6 @@ "descriptors": [ "ACTION", "BASH", - "GO", "KOTLIN" ], "label": "Optimized for GO based projects", diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index 1aac056468e..aa8c1cb9cda 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -10,7 +10,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM ghcr.io/mgechev/revive:1.2.5 as revive #FROM__END ################## @@ -47,7 +47,6 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ && git config --global core.autocrlf true #APK__END @@ -115,7 +114,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START - +COPY --from=revive /usr/bin/revive /usr/bin/revive #COPY__END ############################################################################################# @@ -123,7 +122,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # revive installation -RUN go install github.com/mgechev/revive@latest && go clean --cache +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive #OTHER__END diff --git a/megalinter/descriptors/all_flavors.json b/megalinter/descriptors/all_flavors.json index f4a9409dce5..5208739ab39 100644 --- a/megalinter/descriptors/all_flavors.json +++ b/megalinter/descriptors/all_flavors.json @@ -31,7 +31,6 @@ "descriptors": [ "ACTION", "BASH", - "GO", "JAVA", "KOTLIN", "PHP", @@ -255,7 +254,6 @@ "descriptors": [ "ACTION", "BASH", - "GO", "KOTLIN" ], "label": "Optimized for GO based projects", diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index a1ac0820fbf..8246b9428dd 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -6,9 +6,6 @@ descriptor_flavors: file_extensions: - ".go" test_folder: golang -install: - apk: - - go linters: # GOLANG CI LINT - linter_name: golangci-lint @@ -77,7 +74,8 @@ linters: - "revive -config myfile.go" install: dockerfile: - - RUN go install github.com/mgechev/revive@latest && go clean --cache + - FROM ghcr.io/mgechev/revive:1.2.5 as revive + - COPY --from=revive /usr/bin/revive /usr/bin/revive ide: atom: - name: linter-revive From 0e25186ed0c4e7cc15252d20b8dbc61ebe5d6541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 6 Feb 2023 04:13:01 +0000 Subject: [PATCH 02/18] Install actionlint from docker image's binary to remove apk go --- Dockerfile | 25 +++++++++++------ flavors/ci_light/Dockerfile | 10 +++---- flavors/cupcake/Dockerfile | 27 ++++++++++++------ flavors/cupcake/flavor.json | 1 - flavors/documentation/Dockerfile | 27 ++++++++++++------ flavors/documentation/flavor.json | 1 - flavors/dotnet/Dockerfile | 25 +++++++++++------ flavors/dotnet/flavor.json | 1 - flavors/go/Dockerfile | 27 ++++++++++++------ flavors/go/flavor.json | 1 - flavors/java/Dockerfile | 27 ++++++++++++------ flavors/java/flavor.json | 1 - flavors/javascript/Dockerfile | 27 ++++++++++++------ flavors/javascript/flavor.json | 1 - flavors/php/Dockerfile | 27 ++++++++++++------ flavors/php/flavor.json | 1 - flavors/python/Dockerfile | 27 ++++++++++++------ flavors/python/flavor.json | 1 - flavors/ruby/Dockerfile | 27 ++++++++++++------ flavors/ruby/flavor.json | 1 - flavors/rust/Dockerfile | 27 ++++++++++++------ flavors/rust/flavor.json | 1 - flavors/salesforce/Dockerfile | 28 ++++++++++++------- flavors/salesforce/flavor.json | 1 - flavors/security/Dockerfile | 8 ++---- flavors/swift/Dockerfile | 27 ++++++++++++------ flavors/swift/flavor.json | 1 - flavors/terraform/Dockerfile | 27 ++++++++++++------ flavors/terraform/flavor.json | 1 - linters/bash_shellcheck/Dockerfile | 11 ++------ .../action.megalinter-descriptor.yml | 17 +++++++---- megalinter/descriptors/all_flavors.json | 13 --------- .../bash.megalinter-descriptor.yml | 9 ++---- 33 files changed, 275 insertions(+), 181 deletions(-) diff --git a/Dockerfile b/Dockerfile index a578a5cb596..9c39ae03113 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -70,7 +75,6 @@ RUN apk add --update --no-cache \ openssh \ docker \ openrc \ - go \ icu-libs \ libcurl \ libintl \ @@ -94,6 +98,8 @@ RUN apk add --update --no-cache \ php81-simplexml \ composer \ dpkg \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -281,6 +287,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -382,8 +393,10 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ # ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk-master/arm-ttk/arm-ttk.psd1" @@ -398,11 +411,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && chmod +x /usr/bin/bash-exec \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index 614e2f1e26d..5f12d5542b4 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -11,6 +11,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks @@ -165,6 +166,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -175,11 +177,7 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # shellcheck installation -RUN ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ @@ -188,7 +186,7 @@ RUN ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ # Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint # dotenv-linter installation - && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ +RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ # checkmake installation && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 0941e572fbb..ba690fe61a4 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -58,7 +63,6 @@ RUN apk add --update --no-cache \ openssh \ docker \ openrc \ - go \ openjdk11 \ gnupg \ php81 \ @@ -72,6 +76,8 @@ RUN apk add --update --no-cache \ php81-simplexml \ composer \ dpkg \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -243,6 +249,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -284,19 +295,17 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI ENV PATH="/root/.composer/vendor/bin:$PATH" # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/cupcake/flavor.json b/flavors/cupcake/flavor.json index 89181ead182..83ecbc94378 100644 --- a/flavors/cupcake/flavor.json +++ b/flavors/cupcake/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "JAVA", "KOTLIN", diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index ad00f2b89f4..11ab17cdf1c 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -191,6 +197,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -203,19 +214,17 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/documentation/flavor.json b/flavors/documentation/flavor.json index c5a95ffe4ef..906cb5e742b 100644 --- a/flavors/documentation/flavor.json +++ b/flavors/documentation/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index dc14306c1a2..913c2e806fe 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -60,7 +65,6 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ icu-libs \ libcurl \ libintl \ @@ -70,6 +74,8 @@ RUN apk add --update --no-cache \ zlib \ zlib-dev \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -211,6 +217,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -267,8 +278,10 @@ RUN --mount=type=secret,id=GITHUB_TOKEN mkdir -p ${PWSH_DIRECTORY} \ # ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk-master/arm-ttk/arm-ttk.psd1" @@ -283,11 +296,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && chmod +x /usr/bin/bash-exec \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/dotnet/flavor.json b/flavors/dotnet/flavor.json index 31d626bdf21..8f6f25ff80e 100644 --- a/flavors/dotnet/flavor.json +++ b/flavors/dotnet/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "ARM", "BASH", "CSHARP", diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 4106712aa3b..55b4387cacc 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -53,8 +58,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -192,6 +198,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -205,19 +216,17 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/go/flavor.json b/flavors/go/flavor.json index 148017a4d50..53562877bc5 100644 --- a/flavors/go/flavor.json +++ b/flavors/go/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 9843ac95457..dc217604755 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -191,6 +197,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -207,19 +218,17 @@ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/java/flavor.json b/flavors/java/flavor.json index e178d5e2bd7..887a58597a2 100644 --- a/flavors/java/flavor.json +++ b/flavors/java/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "JAVA", "KOTLIN" diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index d66e3a664cc..60474e589cb 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -213,6 +219,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -225,19 +236,17 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/javascript/flavor.json b/flavors/javascript/flavor.json index 31d31cdc44b..b6ce44edbe6 100644 --- a/flavors/javascript/flavor.json +++ b/flavors/javascript/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN", "TYPESCRIPT" diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 76ad3392bb9..99eecf162f9 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,7 +57,6 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ gnupg \ php81 \ @@ -66,6 +70,8 @@ RUN apk add --update --no-cache \ php81-simplexml \ composer \ dpkg \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -203,6 +209,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -233,19 +244,17 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI ENV PATH="/root/.composer/vendor/bin:$PATH" # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/php/flavor.json b/flavors/php/flavor.json index 3716e6350e4..bf6b63dea7a 100644 --- a/flavors/php/flavor.json +++ b/flavors/php/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN", "PHP" diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 8d4e7e60892..1b676b0e454 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -201,6 +207,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -213,19 +224,17 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/python/flavor.json b/flavors/python/flavor.json index eaf5fdfefce..31c09ff92ea 100644 --- a/flavors/python/flavor.json +++ b/flavors/python/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 07edbdaae3b..71bfe09866e 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -197,6 +203,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -209,19 +220,17 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/ruby/flavor.json b/flavors/ruby/flavor.json index 55f0f058ee5..1a7caa05aeb 100644 --- a/flavors/ruby/flavor.json +++ b/flavors/ruby/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 99bd027a382..9945d90fb93 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -191,6 +197,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -203,19 +214,17 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/rust/flavor.json b/flavors/rust/flavor.json index df6ae986711..ee66213a12f 100644 --- a/flavors/rust/flavor.json +++ b/flavors/rust/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index fc9aff0f178..e4ed1124b3a 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -52,8 +57,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -194,6 +200,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -210,23 +221,20 @@ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" RUN echo y|sfdx plugins:install sfdx-hardis \ && npm cache clean --force || true \ - && rm -rf /root/.npm/_cacache - + && rm -rf /root/.npm/_cacache \ # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/salesforce/flavor.json b/flavors/salesforce/flavor.json index 835bbe780f1..bc2d5ece479 100644 --- a/flavors/salesforce/flavor.json +++ b/flavors/salesforce/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN", "SALESFORCE" diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 97aea287683..7215af1eb70 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -11,6 +11,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint @@ -161,6 +162,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ @@ -179,11 +181,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # hadolint installation # Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 17a0ed2c891..d22f5dfbaae 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -54,8 +59,9 @@ RUN apk add --update --no-cache \ openssh \ docker \ openrc \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -193,6 +199,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -204,21 +215,19 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #OTHER__START -RUN rc-update add docker boot && rc-service docker start || true +RUN rc-update add docker boot && rc-service docker start || true \ # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/swift/flavor.json b/flavors/swift/flavor.json index bde47f2e467..53910bb7a7a 100644 --- a/flavors/swift/flavor.json +++ b/flavors/swift/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index cb0b6cdd1d0..584b7c49f6e 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -11,6 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:1.6.23 as actionlint +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:v0.9.0 as shellcheck + +FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -56,8 +61,9 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ openjdk11 \ + py3-pyflakes \ + go \ nodejs \ npm \ yarn \ @@ -195,6 +201,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START +COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker @@ -213,19 +224,17 @@ COPY --from=kics /app/bin/assets /opt/kics/assets/ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache \ +# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + # 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 \ +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 \ # shellcheck installation - && ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/terraform/flavor.json b/flavors/terraform/flavor.json index 5596117063a..c5a025be188 100644 --- a/flavors/terraform/flavor.json +++ b/flavors/terraform/flavor.json @@ -1,6 +1,5 @@ { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/linters/bash_shellcheck/Dockerfile b/linters/bash_shellcheck/Dockerfile index a1041914778..a8cc5649f83 100644 --- a/linters/bash_shellcheck/Dockerfile +++ b/linters/bash_shellcheck/Dockerfile @@ -10,7 +10,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM koalaman/shellcheck:v0.9.0 as shellcheck #FROM__END ################## @@ -118,7 +118,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START - +COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #COPY__END ############################################################################################# @@ -126,12 +126,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #OTHER__START # shellcheck installation -RUN ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete - +# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #OTHER__END diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index 32ae1c4e060..55cc62d0c95 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -7,9 +7,6 @@ files_sub_directory: .github/workflows file_extensions: - ".yml" - ".yaml" -install: - apk: - - go test_folder: action linters: # ACTIONLINT @@ -27,6 +24,16 @@ linters: examples: - "actionlint /path/to/workflow1.yml /path/to/workflow2.yaml" install: + # actionlint requires shellcheck and pyflakes + apk: + - py3-pyflakes dockerfile: - - ENV GO111MODULE=on - - RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache + - | + FROM rhysd/actionlint:1.6.23 as actionlint + # shellcheck is a dependency for actionlint + FROM koalaman/shellcheck:v0.9.0 as shellcheck + - | + COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint + # shellcheck is a dependency for actionlint + COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + diff --git a/megalinter/descriptors/all_flavors.json b/megalinter/descriptors/all_flavors.json index 5208739ab39..dc713405561 100644 --- a/megalinter/descriptors/all_flavors.json +++ b/megalinter/descriptors/all_flavors.json @@ -29,7 +29,6 @@ }, "cupcake": { "descriptors": [ - "ACTION", "BASH", "JAVA", "KOTLIN", @@ -122,7 +121,6 @@ }, "documentation": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], @@ -179,7 +177,6 @@ }, "dotnet": { "descriptors": [ - "ACTION", "ARM", "BASH", "CSHARP", @@ -252,7 +249,6 @@ }, "go": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], @@ -311,7 +307,6 @@ }, "java": { "descriptors": [ - "ACTION", "BASH", "JAVA", "KOTLIN" @@ -372,7 +367,6 @@ }, "javascript": { "descriptors": [ - "ACTION", "BASH", "KOTLIN", "TYPESCRIPT" @@ -439,7 +433,6 @@ }, "php": { "descriptors": [ - "ACTION", "BASH", "KOTLIN", "PHP" @@ -500,7 +493,6 @@ }, "python": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], @@ -567,7 +559,6 @@ }, "ruby": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], @@ -624,7 +615,6 @@ }, "rust": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], @@ -681,7 +671,6 @@ }, "salesforce": { "descriptors": [ - "ACTION", "BASH", "KOTLIN", "SALESFORCE" @@ -769,7 +758,6 @@ }, "swift": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], @@ -826,7 +814,6 @@ }, "terraform": { "descriptors": [ - "ACTION", "BASH", "KOTLIN" ], diff --git a/megalinter/descriptors/bash.megalinter-descriptor.yml b/megalinter/descriptors/bash.megalinter-descriptor.yml index fa1af947406..7dcf9b0a374 100644 --- a/megalinter/descriptors/bash.megalinter-descriptor.yml +++ b/megalinter/descriptors/bash.megalinter-descriptor.yml @@ -73,12 +73,9 @@ linters: cargo: - shellcheck-sarif dockerfile: - - | - RUN ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ - && mkdir -p ${ML_THIRD_PARTY_DIR} \ - && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ - && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete + # Also update shellcheck version in action.megalinter-descriptor.yml + - FROM koalaman/shellcheck:v0.9.0 as shellcheck + - COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck ide: atom: - name: linter-shellcheck From 5fbd21185b2bfc19ac3aa0928a60eed4aed4fb42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 6 Feb 2023 05:25:57 +0000 Subject: [PATCH 03/18] Install checkmake from docker image binary --- Dockerfile | 6 +++--- flavors/ci_light/Dockerfile | 6 +++--- flavors/cupcake/Dockerfile | 7 +++---- flavors/documentation/Dockerfile | 6 +++--- flavors/dotnet/Dockerfile | 6 +++--- flavors/go/Dockerfile | 6 +++--- flavors/java/Dockerfile | 6 +++--- flavors/python/Dockerfile | 6 +++--- .../descriptors/makefile.megalinter-descriptor.yml | 12 ++++++++---- 9 files changed, 32 insertions(+), 29 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c39ae03113..dad94a2d9ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker FROM ghcr.io/mgechev/revive:1.2.5 as revive FROM ghcr.io/assignuser/chktex-alpine:latest as chktex +FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint @@ -297,6 +298,7 @@ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=chktex /usr/bin/chktex /usr/bin/ +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ @@ -517,9 +519,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && cd / \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # perlcritic installation && curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wget Perl::Critic diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index 5f12d5542b4..df40186ef93 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -14,6 +14,7 @@ FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint +FROM mrtazz/checkmake:latest as checkmake FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -169,6 +170,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -189,9 +191,7 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # gitleaks installation # Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index ba690fe61a4..fd8beb4f78f 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -20,6 +20,7 @@ FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker FROM ghcr.io/mgechev/revive:1.2.5 as revive +FROM mrtazz/checkmake:latest as checkmake FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan @@ -258,6 +259,7 @@ COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ COPY --from=terrascan /go/bin/terrascan /usr/bin/ @@ -375,10 +377,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake - +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # phpcs installation RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192 diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 11ab17cdf1c..4a84afc13b1 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -19,6 +19,7 @@ FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -205,6 +206,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -263,9 +265,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # protolint installation # Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 913c2e806fe..fdcfd38ecf0 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -19,6 +19,7 @@ FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -225,6 +226,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -343,9 +345,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # powershell installation && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 55b4387cacc..48b3cf84652 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -20,6 +20,7 @@ FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker FROM ghcr.io/mgechev/revive:1.2.5 as revive +FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -207,6 +208,7 @@ COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -272,9 +274,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # protolint installation # Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index dc217604755..63d40dea7cc 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -19,6 +19,7 @@ FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -205,6 +206,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -291,9 +293,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # protolint installation # Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 1b676b0e454..bea9dcc19b7 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -19,6 +19,7 @@ FROM koalaman/shellcheck:v0.9.0 as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker +FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks #FROM__END @@ -215,6 +216,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END @@ -273,9 +275,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation - && ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake \ +# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake # protolint installation # Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ diff --git a/megalinter/descriptors/makefile.megalinter-descriptor.yml b/megalinter/descriptors/makefile.megalinter-descriptor.yml index 4b1474f197b..61ce9b93c1f 100644 --- a/megalinter/descriptors/makefile.megalinter-descriptor.yml +++ b/megalinter/descriptors/makefile.megalinter-descriptor.yml @@ -25,8 +25,12 @@ linters: - "checkmake Makefile" - "checkmake --config .checkmake.ini Makefile" install: + # make is included in the mrtazz/checkmake:latest image + # (DIGEST:sha256:eb6919b20b22d1701a976856e4a224627df0a74b118246101fb6cf5c2e03049f) + # It may not be a real dependency, like their pandoc mention in the README, + # that is not included in the docker image they provide. + apk: + - make dockerfile: - - | - RUN ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake + - FROM mrtazz/checkmake:latest as checkmake + - COPY --from=checkmake /checkmake /usr/bin/checkmake From a0f6626461ee6302886bb41a5c31e7ef55b486bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 12 Feb 2023 21:52:58 +0000 Subject: [PATCH 04/18] Use latest instead of tags for modified docker images --- Dockerfile | 6 +++--- flavors/ci_light/Dockerfile | 2 +- flavors/cupcake/Dockerfile | 7 +++---- flavors/documentation/Dockerfile | 6 +++--- flavors/dotnet/Dockerfile | 6 +++--- flavors/go/Dockerfile | 7 +++---- flavors/java/Dockerfile | 6 +++--- flavors/javascript/Dockerfile | 6 +++--- flavors/php/Dockerfile | 7 +++---- flavors/python/Dockerfile | 7 +++---- flavors/ruby/Dockerfile | 7 +++---- flavors/rust/Dockerfile | 7 +++---- flavors/salesforce/Dockerfile | 7 +++---- flavors/security/Dockerfile | 2 +- flavors/swift/Dockerfile | 7 +++---- flavors/terraform/Dockerfile | 7 +++---- linters/bash_shellcheck/Dockerfile | 2 +- megalinter/descriptors/action.megalinter-descriptor.yml | 4 ++-- megalinter/descriptors/bash.megalinter-descriptor.yml | 2 +- 19 files changed, 48 insertions(+), 57 deletions(-) diff --git a/Dockerfile b/Dockerfile index dad94a2d9ca..b3df0cc26ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index df40186ef93..a21dbbce018 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -11,7 +11,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mrtazz/checkmake:latest as checkmake diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index fd8beb4f78f..4e8730d238c 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -78,7 +78,6 @@ RUN apk add --update --no-cache \ composer \ dpkg \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 4a84afc13b1..873d9aaf48d 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index fdcfd38ecf0..dbf63190de0 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 48b3cf84652..73a6f34fde3 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -61,7 +61,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 63d40dea7cc..34e8485ba84 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index 60474e589cb..70ac0ccfffe 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 99eecf162f9..d4c0edca508 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -71,7 +71,6 @@ RUN apk add --update --no-cache \ composer \ dpkg \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index bea9dcc19b7..014cbdbe9cf 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -60,7 +60,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 71bfe09866e..bdaeb3e9aee 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -59,7 +59,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 9945d90fb93..07c40d09755 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -59,7 +59,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index e4ed1124b3a..600d21cc84b 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -59,7 +59,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 7215af1eb70..035dd3f4bdb 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -11,7 +11,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index d22f5dfbaae..027dce9d8aa 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -61,7 +61,6 @@ RUN apk add --update --no-cache \ openrc \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 584b7c49f6e..8e77b62dd9d 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -11,11 +11,11 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM rhysd/actionlint:1.6.23 as actionlint +FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -63,7 +63,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/linters/bash_shellcheck/Dockerfile b/linters/bash_shellcheck/Dockerfile index a8cc5649f83..1e570a74ef9 100644 --- a/linters/bash_shellcheck/Dockerfile +++ b/linters/bash_shellcheck/Dockerfile @@ -10,7 +10,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM koalaman/shellcheck:v0.9.0 as shellcheck +FROM koalaman/shellcheck:stable as shellcheck #FROM__END ################## diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index 55cc62d0c95..9adae96d837 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -29,9 +29,9 @@ linters: - py3-pyflakes dockerfile: - | - FROM rhysd/actionlint:1.6.23 as actionlint + FROM rhysd/actionlint:latest as actionlint # shellcheck is a dependency for actionlint - FROM koalaman/shellcheck:v0.9.0 as shellcheck + FROM koalaman/shellcheck:stable as shellcheck - | COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint diff --git a/megalinter/descriptors/bash.megalinter-descriptor.yml b/megalinter/descriptors/bash.megalinter-descriptor.yml index 7dcf9b0a374..ecfffba38a1 100644 --- a/megalinter/descriptors/bash.megalinter-descriptor.yml +++ b/megalinter/descriptors/bash.megalinter-descriptor.yml @@ -74,7 +74,7 @@ linters: - shellcheck-sarif dockerfile: # Also update shellcheck version in action.megalinter-descriptor.yml - - FROM koalaman/shellcheck:v0.9.0 as shellcheck + - FROM koalaman/shellcheck:stable as shellcheck - COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck ide: atom: From 1984bbc4b06315b1282de6cd3b90df3599bdb7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 00:42:38 +0000 Subject: [PATCH 05/18] Use a builder image for revive as the released binaries return broken version number --- Dockerfile | 11 ++++++++--- flavors/cupcake/Dockerfile | 11 ++++++++--- flavors/go/Dockerfile | 11 ++++++++--- linters/go_revive/Dockerfile | 11 ++++++++--- megalinter/descriptors/go.megalinter-descriptor.yml | 12 ++++++++++-- 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3df0cc26ee..0f4d589be47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,12 @@ FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker -FROM ghcr.io/mgechev/revive:1.2.5 as revive +FROM golang:1.19-alpine as revive +## The golang image used as a builder is a temporary workaround +## for the released revive binaries not returning version numbers (devel). +## The install command should then be what is commented in the go.megalinter-descriptor.yml +RUN go install github.com/mgechev/revive@latest + FROM ghcr.io/assignuser/chktex-alpine:latest as chktex FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint @@ -296,7 +301,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --from=revive /go/bin/revive /usr/bin/revive COPY --from=chktex /usr/bin/chktex /usr/bin/ COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -454,7 +459,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 4e8730d238c..3b0d6c481ed 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -19,7 +19,12 @@ FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker -FROM ghcr.io/mgechev/revive:1.2.5 as revive +FROM golang:1.19-alpine as revive +## The golang image used as a builder is a temporary workaround +## for the released revive binaries not returning version numbers (devel). +## The install command should then be what is commented in the go.megalinter-descriptor.yml +RUN go install github.com/mgechev/revive@latest + FROM mrtazz/checkmake:latest as checkmake FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint @@ -257,7 +262,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --from=revive /go/bin/revive /usr/bin/revive COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ @@ -330,7 +335,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 73a6f34fde3..1b49909087f 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -19,7 +19,12 @@ FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker -FROM ghcr.io/mgechev/revive:1.2.5 as revive +FROM golang:1.19-alpine as revive +## The golang image used as a builder is a temporary workaround +## for the released revive binaries not returning version numbers (devel). +## The install command should then be what is commented in the go.megalinter-descriptor.yml +RUN go install github.com/mgechev/revive@latest + FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint FROM zricethezav/gitleaks:v8.15.3 as gitleaks @@ -206,7 +211,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --from=revive /go/bin/revive /usr/bin/revive COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -246,7 +251,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive # ktlint installation && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index aa8c1cb9cda..cf2850e1298 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -10,7 +10,12 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START -FROM ghcr.io/mgechev/revive:1.2.5 as revive +FROM golang:1.19-alpine as revive +## The golang image used as a builder is a temporary workaround +## for the released revive binaries not returning version numbers (devel). +## The install command should then be what is commented in the go.megalinter-descriptor.yml +RUN go install github.com/mgechev/revive@latest + #FROM__END ################## @@ -114,7 +119,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --from=revive /go/bin/revive /usr/bin/revive #COPY__END ############################################################################################# @@ -122,7 +127,7 @@ COPY --from=revive /usr/bin/revive /usr/bin/revive ############################################################################################# #OTHER__START # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive #OTHER__END diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index 8246b9428dd..7961b0957be 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -74,8 +74,16 @@ linters: - "revive -config myfile.go" install: dockerfile: - - FROM ghcr.io/mgechev/revive:1.2.5 as revive - - COPY --from=revive /usr/bin/revive /usr/bin/revive + ## Until "FROM ghcr.io/mgechev/revive:1.2.5 as revive" is available, use + # - FROM ghcr.io/mgechev/revive:1.2.5 as revive + # - COPY --from=revive /usr/bin/revive /usr/bin/revive + - | + FROM golang:1.19-alpine as revive + ## The golang image used as a builder is a temporary workaround + ## for the released revive binaries not returning version numbers (devel). + ## The install command should then be what is commented in the go.megalinter-descriptor.yml + RUN go install github.com/mgechev/revive@latest + - COPY --from=revive /go/bin/revive /usr/bin/revive ide: atom: - name: linter-revive From 295a4c1b93319ece6df316f1c5b0cd71f9606952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 01:13:56 +0000 Subject: [PATCH 06/18] Edit comment in actionlint Dockerfile instructions --- Dockerfile | 2 +- flavors/cupcake/Dockerfile | 2 +- flavors/documentation/Dockerfile | 2 +- flavors/dotnet/Dockerfile | 2 +- flavors/go/Dockerfile | 2 +- flavors/java/Dockerfile | 2 +- flavors/javascript/Dockerfile | 2 +- flavors/php/Dockerfile | 2 +- flavors/python/Dockerfile | 2 +- flavors/ruby/Dockerfile | 2 +- flavors/rust/Dockerfile | 2 +- flavors/salesforce/Dockerfile | 2 +- flavors/swift/Dockerfile | 2 +- flavors/terraform/Dockerfile | 2 +- megalinter/descriptors/action.megalinter-descriptor.yml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f4d589be47..e459cb2bab6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 3b0d6c481ed..05910bcacef 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 873d9aaf48d..c8d3e4908da 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index dbf63190de0..887dd4fad39 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 1b49909087f..4e4245e6746 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 34e8485ba84..5494df945d7 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index 70ac0ccfffe..d4c92e7653b 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index d4c0edca508..725c8036649 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 014cbdbe9cf..309fe1f0577 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index bdaeb3e9aee..a3e77b03b13 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 07c40d09755..e2769bd193b 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 600d21cc84b..49226589025 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 027dce9d8aa..2f4dbabb652 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 8e77b62dd9d..c9e0b4a0765 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint +# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index 9adae96d837..a1162204897 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -30,7 +30,7 @@ linters: dockerfile: - | FROM rhysd/actionlint:latest as actionlint - # shellcheck is a dependency for actionlint + # shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck - | COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint From 56ffd40bf45c1515ca4cca47e597123e337d9985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 02:24:41 +0000 Subject: [PATCH 07/18] Build dustilock in a stage and copy go binary --- Dockerfile | 14 +++++--------- flavors/security/Dockerfile | 15 +++++---------- linters/repository_dustilock/Dockerfile | 16 ++++------------ .../repository.megalinter-descriptor.yml | 18 ++++++------------ 4 files changed, 20 insertions(+), 43 deletions(-) diff --git a/Dockerfile b/Dockerfile index e459cb2bab6..065ffced279 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,9 @@ RUN go install github.com/mgechev/revive@latest FROM ghcr.io/assignuser/chktex-alpine:latest as chktex FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint +FROM golang:alpine as dustilock +RUN GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v1.2.0 + FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan @@ -305,6 +308,7 @@ COPY --from=revive /go/bin/revive /usr/bin/revive COPY --from=chktex /usr/bin/chktex /usr/bin/ COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ COPY --from=terrascan /go/bin/terrascan /usr/bin/ @@ -581,15 +585,7 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ # dustilock installation - && ML_THIRD_PARTY_DIR=/download/dustilock && \ - mkdir -p ${ML_THIRD_PARTY_DIR} && \ - git clone https://github.com/Checkmarx/dustilock.git ${ML_THIRD_PARTY_DIR} && \ - cd ${ML_THIRD_PARTY_DIR} && \ - go build && go clean --cache && \ - chmod +x dustilock && \ - mv "${ML_THIRD_PARTY_DIR}/dustilock" /usr/bin/ && \ - find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete && \ - cd / \ +# Managed with COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock # gitleaks installation # Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 035dd3f4bdb..47ea61c0797 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -13,6 +13,9 @@ #FROM__START FROM koalaman/shellcheck:stable as shellcheck FROM hadolint/hadolint:v2.12.0-alpine as hadolint +FROM golang:alpine as dustilock +RUN GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v1.2.0 + FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan @@ -62,7 +65,6 @@ RUN apk add --update --no-cache \ lttng-ust-dev \ zlib \ zlib-dev \ - go \ npm \ nodejs-current \ yarn \ @@ -164,6 +166,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ COPY --from=terrascan /go/bin/terrascan /usr/bin/ @@ -214,15 +217,7 @@ ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ # dustilock installation - && ML_THIRD_PARTY_DIR=/download/dustilock && \ - mkdir -p ${ML_THIRD_PARTY_DIR} && \ - git clone https://github.com/Checkmarx/dustilock.git ${ML_THIRD_PARTY_DIR} && \ - cd ${ML_THIRD_PARTY_DIR} && \ - go build && go clean --cache && \ - chmod +x dustilock && \ - mv "${ML_THIRD_PARTY_DIR}/dustilock" /usr/bin/ && \ - find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete && \ - cd / \ +# Managed with COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock # gitleaks installation # Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ diff --git a/linters/repository_dustilock/Dockerfile b/linters/repository_dustilock/Dockerfile index a0884349cc7..103cc132c75 100644 --- a/linters/repository_dustilock/Dockerfile +++ b/linters/repository_dustilock/Dockerfile @@ -10,6 +10,8 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM golang:alpine as dustilock +RUN GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v1.2.0 #FROM__END @@ -47,7 +49,6 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ && git config --global core.autocrlf true #APK__END @@ -115,7 +116,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START - +COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock #COPY__END ############################################################################################# @@ -123,16 +124,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # dustilock installation -RUN ML_THIRD_PARTY_DIR=/download/dustilock && \ - mkdir -p ${ML_THIRD_PARTY_DIR} && \ - git clone https://github.com/Checkmarx/dustilock.git ${ML_THIRD_PARTY_DIR} && \ - cd ${ML_THIRD_PARTY_DIR} && \ - go build && go clean --cache && \ - chmod +x dustilock && \ - mv "${ML_THIRD_PARTY_DIR}/dustilock" /usr/bin/ && \ - find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete && \ - cd / - +# Managed with COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock #OTHER__END diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index ffe0592713c..a56f36eee47 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -116,24 +116,18 @@ linters: - --recursive cli_lint_errors_count: regex_count cli_lint_errors_regex: "(error )" - linter_version_cache: "0.0.0" + linter_version_cache: "1.2.0" test_folder: dustilock examples: - "dustilock" install: - apk: - - go dockerfile: + # The golang image used as a builder is a temporary workaround + # Dustilock is not released as a binary or container - | - RUN ML_THIRD_PARTY_DIR=/download/dustilock && \ - mkdir -p ${ML_THIRD_PARTY_DIR} && \ - git clone https://github.com/Checkmarx/dustilock.git ${ML_THIRD_PARTY_DIR} && \ - cd ${ML_THIRD_PARTY_DIR} && \ - go build && go clean --cache && \ - chmod +x dustilock && \ - mv "${ML_THIRD_PARTY_DIR}/dustilock" /usr/bin/ && \ - find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete && \ - cd / + FROM golang:alpine as dustilock + RUN GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v1.2.0 + - COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock # GIT_DIFF - linter_name: git_diff From 0e960c81fe87a078ead016755d9fa81c7eda5df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 02:38:53 +0000 Subject: [PATCH 08/18] Specify GOBIN folder for revive install in builder --- Dockerfile | 6 +++--- flavors/cupcake/Dockerfile | 6 +++--- flavors/go/Dockerfile | 6 +++--- linters/go_revive/Dockerfile | 6 +++--- megalinter/descriptors/go.megalinter-descriptor.yml | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 065ffced279..18b26ac7caf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ FROM golang:1.19-alpine as revive ## The golang image used as a builder is a temporary workaround ## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml -RUN go install github.com/mgechev/revive@latest +RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest FROM ghcr.io/assignuser/chktex-alpine:latest as chktex FROM mrtazz/checkmake:latest as checkmake @@ -304,7 +304,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /go/bin/revive /usr/bin/revive +COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=chktex /usr/bin/chktex /usr/bin/ COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -463,7 +463,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 05910bcacef..b82140fe696 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -23,7 +23,7 @@ FROM golang:1.19-alpine as revive ## The golang image used as a builder is a temporary workaround ## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml -RUN go install github.com/mgechev/revive@latest +RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest FROM mrtazz/checkmake:latest as checkmake FROM zricethezav/gitleaks:v8.15.3 as gitleaks @@ -262,7 +262,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /go/bin/revive /usr/bin/revive +COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ @@ -335,7 +335,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 4e4245e6746..f6e0a71ba44 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -23,7 +23,7 @@ FROM golang:1.19-alpine as revive ## The golang image used as a builder is a temporary workaround ## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml -RUN go install github.com/mgechev/revive@latest +RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest FROM mrtazz/checkmake:latest as checkmake FROM yoheimuta/protolint:latest as protolint @@ -211,7 +211,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --from=shfmt /bin/shfmt /usr/bin/ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /go/bin/revive /usr/bin/revive +COPY --from=revive /usr/bin/revive /usr/bin/revive COPY --from=checkmake /checkmake /usr/bin/checkmake COPY --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -251,7 +251,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive # ktlint installation && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index cf2850e1298..f3caeff3373 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -14,7 +14,7 @@ FROM golang:1.19-alpine as revive ## The golang image used as a builder is a temporary workaround ## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml -RUN go install github.com/mgechev/revive@latest +RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest #FROM__END @@ -119,7 +119,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=revive /go/bin/revive /usr/bin/revive +COPY --from=revive /usr/bin/revive /usr/bin/revive #COPY__END ############################################################################################# @@ -127,7 +127,7 @@ COPY --from=revive /go/bin/revive /usr/bin/revive ############################################################################################# #OTHER__START # revive installation -# Managed with COPY --from=revive /go/bin/revive /usr/bin/revive +# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive #OTHER__END diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index 7961b0957be..ecb749460a0 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -82,8 +82,8 @@ linters: ## The golang image used as a builder is a temporary workaround ## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml - RUN go install github.com/mgechev/revive@latest - - COPY --from=revive /go/bin/revive /usr/bin/revive + RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest + - COPY --from=revive /usr/bin/revive /usr/bin/revive ide: atom: - name: linter-revive From a10231fc6b2a2ee785fa70994d622cf981a583ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 02:57:24 +0000 Subject: [PATCH 09/18] Remove unneeded GOPATH and GOROOT variables Unneeded since we are not building go packages from source anymore --- Dockerfile | 13 +++++-------- flavors/ci_light/Dockerfile | 13 +++++-------- flavors/cupcake/Dockerfile | 13 +++++-------- flavors/documentation/Dockerfile | 13 +++++-------- flavors/dotnet/Dockerfile | 13 +++++-------- flavors/go/Dockerfile | 13 +++++-------- flavors/java/Dockerfile | 13 +++++-------- flavors/javascript/Dockerfile | 13 +++++-------- flavors/php/Dockerfile | 13 +++++-------- flavors/python/Dockerfile | 13 +++++-------- flavors/ruby/Dockerfile | 13 +++++-------- flavors/rust/Dockerfile | 13 +++++-------- flavors/salesforce/Dockerfile | 13 +++++-------- flavors/security/Dockerfile | 13 +++++-------- flavors/swift/Dockerfile | 13 +++++-------- flavors/terraform/Dockerfile | 13 +++++-------- linters/ansible_ansible_lint/Dockerfile | 13 +++++-------- linters/bash_shellcheck/Dockerfile | 13 +++++-------- linters/cloudformation_cfn_lint/Dockerfile | 13 +++++-------- linters/dockerfile_hadolint/Dockerfile | 13 +++++-------- linters/go_revive/Dockerfile | 13 +++++-------- linters/groovy_npm_groovy_lint/Dockerfile | 13 +++++-------- linters/java_checkstyle/Dockerfile | 13 +++++-------- linters/java_pmd/Dockerfile | 13 +++++-------- linters/javascript_es/Dockerfile | 13 +++++-------- linters/json_eslint_plugin_jsonc/Dockerfile | 13 +++++-------- linters/jsx_eslint/Dockerfile | 13 +++++-------- linters/kotlin_ktlint/Dockerfile | 13 +++++-------- linters/php_psalm/Dockerfile | 13 +++++-------- linters/python_bandit/Dockerfile | 13 +++++-------- linters/repository_checkov/Dockerfile | 13 +++++-------- linters/repository_devskim/Dockerfile | 13 +++++-------- linters/repository_dustilock/Dockerfile | 13 +++++-------- linters/repository_gitleaks/Dockerfile | 13 +++++-------- linters/repository_secretlint/Dockerfile | 13 +++++-------- linters/repository_semgrep/Dockerfile | 13 +++++-------- linters/repository_syft/Dockerfile | 13 +++++-------- linters/repository_trivy/Dockerfile | 13 +++++-------- linters/terraform_checkov/Dockerfile | 13 +++++-------- linters/terraform_terrascan/Dockerfile | 13 +++++-------- linters/terraform_tflint/Dockerfile | 13 +++++-------- linters/tsx_eslint/Dockerfile | 13 +++++-------- linters/typescript_es/Dockerfile | 13 +++++-------- 43 files changed, 215 insertions(+), 344 deletions(-) diff --git a/Dockerfile b/Dockerfile index 18b26ac7caf..ed2771e5283 100644 --- a/Dockerfile +++ b/Dockerfile @@ -131,15 +131,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index a21dbbce018..c9443cec83c 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -68,15 +68,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index b82140fe696..6a23d931e56 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -98,15 +98,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index c8d3e4908da..63179f25b91 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -76,15 +76,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 887dd4fad39..d04f690a727 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -92,15 +92,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index f6e0a71ba44..a281093f8af 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -81,15 +81,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 5494df945d7..95433822748 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -76,15 +76,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index d4c92e7653b..cd7a48be806 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -75,15 +75,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 725c8036649..6b43580cab9 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -86,15 +86,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 309fe1f0577..ed38bf2ca1b 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -75,15 +75,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index a3e77b03b13..e74bede5e94 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -74,15 +74,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index e2769bd193b..d133744604d 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -74,15 +74,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 49226589025..56e758b6a4c 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -74,15 +74,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 47ea61c0797..f08e86467ee 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -71,15 +71,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 2f4dbabb652..d55d500041e 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -76,15 +76,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index c9e0b4a0765..a0c71c492d5 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -78,15 +78,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/ansible_ansible_lint/Dockerfile b/linters/ansible_ansible_lint/Dockerfile index e9ffd2cb21b..1c0eb42fa91 100644 --- a/linters/ansible_ansible_lint/Dockerfile +++ b/linters/ansible_ansible_lint/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/bash_shellcheck/Dockerfile b/linters/bash_shellcheck/Dockerfile index 1e570a74ef9..1fe8495dd0a 100644 --- a/linters/bash_shellcheck/Dockerfile +++ b/linters/bash_shellcheck/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/cloudformation_cfn_lint/Dockerfile b/linters/cloudformation_cfn_lint/Dockerfile index 79ea861b771..8f5ab5da219 100644 --- a/linters/cloudformation_cfn_lint/Dockerfile +++ b/linters/cloudformation_cfn_lint/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/dockerfile_hadolint/Dockerfile b/linters/dockerfile_hadolint/Dockerfile index faf802e2b88..01f921c032b 100644 --- a/linters/dockerfile_hadolint/Dockerfile +++ b/linters/dockerfile_hadolint/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index f3caeff3373..72324a427d7 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -55,15 +55,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/groovy_npm_groovy_lint/Dockerfile b/linters/groovy_npm_groovy_lint/Dockerfile index db1f949926a..1e36202d246 100644 --- a/linters/groovy_npm_groovy_lint/Dockerfile +++ b/linters/groovy_npm_groovy_lint/Dockerfile @@ -54,15 +54,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/java_checkstyle/Dockerfile b/linters/java_checkstyle/Dockerfile index 03cc8782e38..477ad7e1941 100644 --- a/linters/java_checkstyle/Dockerfile +++ b/linters/java_checkstyle/Dockerfile @@ -51,15 +51,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/java_pmd/Dockerfile b/linters/java_pmd/Dockerfile index ad901d1efc9..698bacd3aae 100644 --- a/linters/java_pmd/Dockerfile +++ b/linters/java_pmd/Dockerfile @@ -51,15 +51,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/javascript_es/Dockerfile b/linters/javascript_es/Dockerfile index 3db6230960d..283d3e61d29 100644 --- a/linters/javascript_es/Dockerfile +++ b/linters/javascript_es/Dockerfile @@ -53,15 +53,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/json_eslint_plugin_jsonc/Dockerfile b/linters/json_eslint_plugin_jsonc/Dockerfile index 9869f226d98..64fffe9a61e 100644 --- a/linters/json_eslint_plugin_jsonc/Dockerfile +++ b/linters/json_eslint_plugin_jsonc/Dockerfile @@ -53,15 +53,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/jsx_eslint/Dockerfile b/linters/jsx_eslint/Dockerfile index f801ba488d5..9b6dd0b0689 100644 --- a/linters/jsx_eslint/Dockerfile +++ b/linters/jsx_eslint/Dockerfile @@ -53,15 +53,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/kotlin_ktlint/Dockerfile b/linters/kotlin_ktlint/Dockerfile index 5183f27daa9..18ec85c625d 100644 --- a/linters/kotlin_ktlint/Dockerfile +++ b/linters/kotlin_ktlint/Dockerfile @@ -51,15 +51,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/php_psalm/Dockerfile b/linters/php_psalm/Dockerfile index 706c947f319..cb0a147b191 100644 --- a/linters/php_psalm/Dockerfile +++ b/linters/php_psalm/Dockerfile @@ -62,15 +62,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_bandit/Dockerfile b/linters/python_bandit/Dockerfile index 63c85e511da..7ea206c1553 100644 --- a/linters/python_bandit/Dockerfile +++ b/linters/python_bandit/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_checkov/Dockerfile b/linters/repository_checkov/Dockerfile index e8b1a14c843..ee999c2c258 100644 --- a/linters/repository_checkov/Dockerfile +++ b/linters/repository_checkov/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_devskim/Dockerfile b/linters/repository_devskim/Dockerfile index e8b8fcf202c..b3c53322d0b 100644 --- a/linters/repository_devskim/Dockerfile +++ b/linters/repository_devskim/Dockerfile @@ -58,15 +58,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_dustilock/Dockerfile b/linters/repository_dustilock/Dockerfile index 103cc132c75..67cf87cedaa 100644 --- a/linters/repository_dustilock/Dockerfile +++ b/linters/repository_dustilock/Dockerfile @@ -52,15 +52,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_gitleaks/Dockerfile b/linters/repository_gitleaks/Dockerfile index d290de3dd97..8ac13762de8 100644 --- a/linters/repository_gitleaks/Dockerfile +++ b/linters/repository_gitleaks/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_secretlint/Dockerfile b/linters/repository_secretlint/Dockerfile index 0ee31d169c3..c08215b5d7d 100644 --- a/linters/repository_secretlint/Dockerfile +++ b/linters/repository_secretlint/Dockerfile @@ -53,15 +53,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_semgrep/Dockerfile b/linters/repository_semgrep/Dockerfile index c9f889d4df7..abb6d39e010 100644 --- a/linters/repository_semgrep/Dockerfile +++ b/linters/repository_semgrep/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_syft/Dockerfile b/linters/repository_syft/Dockerfile index 2442d1da2cb..21beedd0448 100644 --- a/linters/repository_syft/Dockerfile +++ b/linters/repository_syft/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_trivy/Dockerfile b/linters/repository_trivy/Dockerfile index fbf59e8a489..3361b53fb84 100644 --- a/linters/repository_trivy/Dockerfile +++ b/linters/repository_trivy/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_checkov/Dockerfile b/linters/terraform_checkov/Dockerfile index 851f2bcb835..070b2d14e5f 100644 --- a/linters/terraform_checkov/Dockerfile +++ b/linters/terraform_checkov/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_terrascan/Dockerfile b/linters/terraform_terrascan/Dockerfile index edf3d49470f..56cdea287ff 100644 --- a/linters/terraform_terrascan/Dockerfile +++ b/linters/terraform_terrascan/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_tflint/Dockerfile b/linters/terraform_tflint/Dockerfile index a50a6af5f9e..1d5e33503e4 100644 --- a/linters/terraform_tflint/Dockerfile +++ b/linters/terraform_tflint/Dockerfile @@ -50,15 +50,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/tsx_eslint/Dockerfile b/linters/tsx_eslint/Dockerfile index 8cb9a88e5d1..f2b04d547c3 100644 --- a/linters/tsx_eslint/Dockerfile +++ b/linters/tsx_eslint/Dockerfile @@ -53,15 +53,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/typescript_es/Dockerfile b/linters/typescript_es/Dockerfile index 3d36dcac919..c99eaeaccc4 100644 --- a/linters/typescript_es/Dockerfile +++ b/linters/typescript_es/Dockerfile @@ -53,15 +53,12 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for golang & python -ENV GOROOT=/usr/lib/go \ - GOPATH=/go - # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for python +# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin -RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ - # Ignore npm package issues - yarn config set ignore-engines true || true +# ENV PATH="$PATH" +# Ignore npm package issues +RUN yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## From 6ffb7def24ddadc79b4cecbce4666e5243cabf87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 03:04:49 +0000 Subject: [PATCH 10/18] Include fixes from linters --- Dockerfile | 2 +- flavors/cupcake/Dockerfile | 2 +- flavors/documentation/Dockerfile | 2 +- flavors/dotnet/Dockerfile | 2 +- flavors/go/Dockerfile | 2 +- flavors/java/Dockerfile | 2 +- flavors/javascript/Dockerfile | 2 +- flavors/php/Dockerfile | 2 +- flavors/python/Dockerfile | 2 +- flavors/ruby/Dockerfile | 2 +- flavors/rust/Dockerfile | 2 +- flavors/salesforce/Dockerfile | 2 +- flavors/swift/Dockerfile | 2 +- flavors/terraform/Dockerfile | 2 +- megalinter/descriptors/action.megalinter-descriptor.yml | 3 +-- megalinter/descriptors/makefile.megalinter-descriptor.yml | 2 +- 16 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed2771e5283..8f795890773 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 6a23d931e56..039543199c5 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 63179f25b91..82a45015766 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index d04f690a727..07e80771944 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index a281093f8af..8cd82bfa872 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 95433822748..74d053dcea5 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index cd7a48be806..57ac82f6cea 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 6b43580cab9..e3723f48d40 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index ed38bf2ca1b..79bb7287187 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index e74bede5e94..5ab850f5030 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index d133744604d..0bdd1e3f1b4 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 56e758b6a4c..507a0b91c8e 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index d55d500041e..fb4f26cee31 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index a0c71c492d5..04150389fcd 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck FROM koalaman/shellcheck:stable as shellcheck diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index a1162204897..f2974bf1129 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -30,10 +30,9 @@ linters: dockerfile: - | FROM rhysd/actionlint:latest as actionlint - # shellcheck is a dependency for actionlint and the FROM command may me safely repeated in a Dockerfile + # shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck - | COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - diff --git a/megalinter/descriptors/makefile.megalinter-descriptor.yml b/megalinter/descriptors/makefile.megalinter-descriptor.yml index 61ce9b93c1f..80e8cdb589c 100644 --- a/megalinter/descriptors/makefile.megalinter-descriptor.yml +++ b/megalinter/descriptors/makefile.megalinter-descriptor.yml @@ -25,7 +25,7 @@ linters: - "checkmake Makefile" - "checkmake --config .checkmake.ini Makefile" install: - # make is included in the mrtazz/checkmake:latest image + # make is included in the mrtazz/checkmake:latest image # (DIGEST:sha256:eb6919b20b22d1701a976856e4a224627df0a74b118246101fb6cf5c2e03049f) # It may not be a real dependency, like their pandoc mention in the README, # that is not included in the docker image they provide. From 91a19c7ec3f85c287b7fc212c6044266837ddb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Feb 2023 03:42:53 +0000 Subject: [PATCH 11/18] Add `COPY --link --from` by using dockerfile frontend syntax --- .automation/build.py | 7 +- Dockerfile | 71 ++++++++++--------- flavors/ci_light/Dockerfile | 23 +++--- flavors/cupcake/Dockerfile | 61 ++++++++-------- flavors/documentation/Dockerfile | 41 +++++------ flavors/dotnet/Dockerfile | 41 +++++------ flavors/go/Dockerfile | 45 ++++++------ flavors/java/Dockerfile | 41 +++++------ flavors/javascript/Dockerfile | 37 +++++----- flavors/php/Dockerfile | 37 +++++----- flavors/python/Dockerfile | 41 +++++------ flavors/ruby/Dockerfile | 37 +++++----- flavors/rust/Dockerfile | 37 +++++----- flavors/salesforce/Dockerfile | 37 +++++----- flavors/security/Dockerfile | 35 ++++----- flavors/swift/Dockerfile | 37 +++++----- flavors/terraform/Dockerfile | 57 +++++++-------- linters/ansible_ansible_lint/Dockerfile | 1 + linters/bash_shellcheck/Dockerfile | 5 +- linters/cloudformation_cfn_lint/Dockerfile | 1 + linters/dockerfile_hadolint/Dockerfile | 5 +- linters/go_revive/Dockerfile | 5 +- linters/groovy_npm_groovy_lint/Dockerfile | 1 + linters/java_checkstyle/Dockerfile | 1 + linters/java_pmd/Dockerfile | 1 + linters/javascript_es/Dockerfile | 1 + linters/json_eslint_plugin_jsonc/Dockerfile | 1 + linters/jsx_eslint/Dockerfile | 1 + linters/kotlin_ktlint/Dockerfile | 1 + linters/php_psalm/Dockerfile | 1 + linters/python_bandit/Dockerfile | 1 + linters/repository_checkov/Dockerfile | 1 + linters/repository_devskim/Dockerfile | 1 + linters/repository_dustilock/Dockerfile | 5 +- linters/repository_gitleaks/Dockerfile | 5 +- linters/repository_secretlint/Dockerfile | 1 + linters/repository_semgrep/Dockerfile | 1 + linters/repository_syft/Dockerfile | 1 + linters/repository_trivy/Dockerfile | 1 + linters/terraform_checkov/Dockerfile | 1 + linters/terraform_terrascan/Dockerfile | 5 +- linters/terraform_tflint/Dockerfile | 5 +- linters/tsx_eslint/Dockerfile | 1 + linters/typescript_es/Dockerfile | 1 + .../action.megalinter-descriptor.yml | 4 +- .../bash.megalinter-descriptor.yml | 4 +- .../dockerfile.megalinter-descriptor.yml | 2 +- .../editorconfig.megalinter-descriptor.yml | 2 +- .../descriptors/go.megalinter-descriptor.yml | 4 +- .../latex.megalinter-descriptor.yml | 2 +- .../makefile.megalinter-descriptor.yml | 2 +- .../protobuf.megalinter-descriptor.yml | 2 +- .../repository.megalinter-descriptor.yml | 4 +- .../terraform.megalinter-descriptor.yml | 10 +-- 54 files changed, 412 insertions(+), 364 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index 9f99ee2053f..bf8f2a0cf68 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -212,8 +212,13 @@ def generate_flavor(flavor, flavor_info): os.makedirs(os.path.dirname(dockerfile), exist_ok=True) copyfile(f"{REPO_HOME}/Dockerfile", dockerfile) flavor_label = flavor_info["label"] - comment = f"# MEGA-LINTER FLAVOR [{flavor}]: {flavor_label}" + comment = f"# MEGALINTER FLAVOR [{flavor}]: {flavor_label}" with open(dockerfile, "r+", encoding="utf-8") as f: + first_line = f.readline().rstrip() + if first_line.startswith("# syntax="): + comment = f"{first_line}\n{comment}" + else: + f.seek(0) content = f.read() f.seek(0) f.truncate() diff --git a/Dockerfile b/Dockerfile index 8f795890773..9d28ec0d323 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -293,25 +294,25 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /usr/bin/revive /usr/bin/revive -COPY --from=chktex /usr/bin/chktex /usr/bin/ -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ -COPY --from=tflint /usr/local/bin/tflint /usr/bin/ -COPY --from=terrascan /go/bin/terrascan /usr/bin/ -COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ -COPY --from=terragrunt /bin/terraform /usr/bin/ -COPY --from=kics /app/bin/kics /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=chktex /usr/bin/chktex /usr/bin/ +COPY --link --from=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ +COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ +COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +COPY --link --from=terragrunt /bin/terraform /usr/bin/ +COPY --link --from=kics /app/bin/kics /usr/bin/ COPY --from=kics /app/bin/assets /opt/kics/assets/ #COPY__END @@ -401,9 +402,9 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ # ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # arm-ttk installation @@ -419,10 +420,10 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # bicep_linter installation && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "${BICEP_URI}" \ @@ -447,10 +448,10 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && rm -r dart-sdk/ \ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -460,7 +461,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --link --from=revive /usr/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ @@ -506,7 +507,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # chktex installation -# Managed with COPY --from=chktex /usr/bin/chktex /usr/bin/ +# Managed with COPY --link --from=chktex /usr/bin/chktex /usr/bin/ && cd ~ && touch .chktexrc && cd / \ # luacheck installation @@ -525,7 +526,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && cd / \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # perlcritic installation && curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wget Perl::Critic @@ -554,7 +555,7 @@ RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # lintr installation && mkdir -p /home/r-library \ @@ -582,10 +583,10 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ # dustilock installation -# Managed with COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock +# Managed with COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # syft installation && curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin \ @@ -631,19 +632,19 @@ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ && dotnet tool install --global TSQLLint \ # tflint installation -# Managed with COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +# Managed with COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ # terrascan installation -# Managed with COPY --from=terrascan /go/bin/terrascan /usr/bin/ +# Managed with COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ # terragrunt installation -# Managed with COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +# Managed with COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ # terraform-fmt installation -# Managed with COPY --from=terragrunt /bin/terraform /usr/bin/ +# Managed with COPY --link --from=terragrunt /bin/terraform /usr/bin/ # kics installation -# Managed with COPY --from=kics /app/bin/kics /usr/bin/ +# Managed with COPY --link --from=kics /app/bin/kics /usr/bin/ && mkdir -p /opt/kics/assets ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries # Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/ diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index c9443cec83c..b2ca24fb724 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [ci_light]: Optimized for CI items (Dockerfile, Jenkinsfile, JSON/YAML schemas,XML +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [ci_light]: Optimized for CI items (Dockerfile, Jenkinsfile, JSON/YAML schemas,XML ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -164,11 +165,11 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint +COPY --link --from=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -176,22 +177,22 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # dotenv-linter installation RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 039543199c5..5995af853d4 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [cupcake]: MegaLinter for the most commonly used languages +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [cupcake]: MegaLinter for the most commonly used languages ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -251,22 +252,22 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /usr/bin/revive /usr/bin/revive -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ -COPY --from=tflint /usr/local/bin/tflint /usr/bin/ -COPY --from=terrascan /go/bin/terrascan /usr/bin/ -COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ -COPY --from=terragrunt /bin/terraform /usr/bin/ -COPY --from=kics /app/bin/kics /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ +COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ +COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +COPY --link --from=terragrunt /bin/terraform /usr/bin/ +COPY --link --from=kics /app/bin/kics /usr/bin/ COPY --from=kics /app/bin/assets /opt/kics/assets/ #COPY__END @@ -298,9 +299,9 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI ENV PATH="/root/.composer/vendor/bin:$PATH" # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -308,10 +309,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # clj-kondo installation && curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \ @@ -319,10 +320,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && ./install-clj-kondo \ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -332,7 +333,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --link --from=revive /usr/bin/revive /usr/bin/revive # checkstyle installation RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \ @@ -378,7 +379,7 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # phpcs installation RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && phive --no-progress install phpcs -g --trust-gpg-keys 31C7E470E2138192 @@ -397,7 +398,7 @@ RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ && composer global config bin-dir --absolute \ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ @@ -411,19 +412,19 @@ RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ && find /tmp -path '/tmp/tmp.*' -type f -name 'misspell*' -delete -o -type d -empty -delete \ # tflint installation -# Managed with COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +# Managed with COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ # terrascan installation -# Managed with COPY --from=terrascan /go/bin/terrascan /usr/bin/ +# Managed with COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ # terragrunt installation -# Managed with COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +# Managed with COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ # terraform-fmt installation -# Managed with COPY --from=terragrunt /bin/terraform /usr/bin/ +# Managed with COPY --link --from=terragrunt /bin/terraform /usr/bin/ # kics installation -# Managed with COPY --from=kics /app/bin/kics /usr/bin/ +# Managed with COPY --link --from=kics /app/bin/kics /usr/bin/ && mkdir -p /opt/kics/assets ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries # Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/ diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 82a45015766..c83198e3b76 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [documentation]: MegaLinter for documentation projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [documentation]: MegaLinter for documentation projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -195,17 +196,17 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -213,9 +214,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -223,16 +224,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -262,13 +263,13 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 07e80771944..0b8cff5642a 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [dotnet]: Optimized for C, C++, C# or VB based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [dotnet]: Optimized for C, C++, C# or VB based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -215,17 +216,17 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -277,9 +278,9 @@ RUN --mount=type=secret,id=GITHUB_TOKEN mkdir -p ${PWSH_DIRECTORY} \ # ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # arm-ttk installation @@ -295,10 +296,10 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # bicep_linter installation && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "${BICEP_URI}" \ @@ -309,10 +310,10 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && /usr/share/dotnet/dotnet tool install -g csharpier \ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -342,7 +343,7 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # powershell installation && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' \ @@ -352,10 +353,10 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 8cd82bfa872..8a58080b8b5 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [go]: Optimized for GO based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [go]: Optimized for GO based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -200,18 +201,18 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=revive /usr/bin/revive /usr/bin/revive -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -219,9 +220,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -229,16 +230,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -248,7 +249,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && golangci-lint --version \ # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --link --from=revive /usr/bin/revive /usr/bin/revive # ktlint installation && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \ @@ -275,13 +276,13 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 74d053dcea5..aa103188c4a 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [java]: Optimized for JAVA based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [java]: Optimized for JAVA based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -195,17 +196,17 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -217,9 +218,9 @@ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk ENV PATH="$JAVA_HOME/bin:${PATH}" # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -227,10 +228,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # clj-kondo installation && curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo \ @@ -238,10 +239,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && ./install-clj-kondo \ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s @@ -290,13 +291,13 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index 57ac82f6cea..6888276c42d 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [javascript]: Optimized for JAVASCRIPT or TYPESCRIPT based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [javascript]: Optimized for JAVASCRIPT or TYPESCRIPT based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -216,16 +217,16 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -233,9 +234,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -243,16 +244,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -282,10 +283,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index e3723f48d40..a7fee1b969e 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [php]: Optimized for PHP based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [php]: Optimized for PHP based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -205,16 +206,16 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -240,9 +241,9 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI ENV PATH="/root/.composer/vendor/bin:$PATH" # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -250,16 +251,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -306,10 +307,10 @@ RUN composer global require --ignore-platform-reqs overtrue/phplint ^5.3 \ && composer global config bin-dir --absolute \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 79bb7287187..45ce22e8074 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [python]: Optimized for PYTHON based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [python]: Optimized for PYTHON based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -204,17 +205,17 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=checkmake /checkmake /usr/bin/checkmake -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=checkmake /checkmake /usr/bin/checkmake +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -222,9 +223,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -232,16 +233,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -271,13 +272,13 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # checkmake installation -# Managed with COPY --from=checkmake /checkmake /usr/bin/checkmake +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 5ab850f5030..a837214b2e5 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [ruby]: Optimized for RUBY based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [ruby]: Optimized for RUBY based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -199,16 +200,16 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -216,9 +217,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -226,16 +227,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -265,10 +266,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 0bdd1e3f1b4..5162735a509 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [rust]: Optimized for RUST based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [rust]: Optimized for RUST based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -193,16 +194,16 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -210,9 +211,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -220,16 +221,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -259,10 +260,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 507a0b91c8e..0b382b5b104 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [salesforce]: Optimized for Salesforce based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [salesforce]: Optimized for Salesforce based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -196,16 +197,16 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -220,9 +221,9 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ && rm -rf /root/.npm/_cacache \ # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -230,16 +231,16 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -269,10 +270,10 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index f08e86467ee..25344ef1323 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [security]: Optimized for security +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [security]: Optimized for security ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -161,14 +162,14 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ -COPY --from=tflint /usr/local/bin/tflint /usr/bin/ -COPY --from=terrascan /go/bin/terrascan /usr/bin/ -COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ -COPY --from=kics /app/bin/kics /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint +COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ +COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ +COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +COPY --link --from=kics /app/bin/kics /usr/bin/ COPY --from=kics /app/bin/assets /opt/kics/assets/ #COPY__END @@ -181,10 +182,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # kubeval installation && ML_THIRD_PARTY_DIR="/third-party/kubeval" \ @@ -214,10 +215,10 @@ ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ # dustilock installation -# Managed with COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock +# Managed with COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # syft installation && curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin \ @@ -226,16 +227,16 @@ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ # tflint installation -# Managed with COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +# Managed with COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ # terrascan installation -# Managed with COPY --from=terrascan /go/bin/terrascan /usr/bin/ +# Managed with COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ # terragrunt installation -# Managed with COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +# Managed with COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ # kics installation -# Managed with COPY --from=kics /app/bin/kics /usr/bin/ +# Managed with COPY --link --from=kics /app/bin/kics /usr/bin/ && mkdir -p /opt/kics/assets ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries # Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/ diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index fb4f26cee31..640f4542bfc 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [swift]: Optimized for SWIFT based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [swift]: Optimized for SWIFT based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -195,16 +196,16 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -213,9 +214,9 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START RUN rc-update add docker boot && rc-service docker start || true \ # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -223,16 +224,16 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -262,10 +263,10 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 04150389fcd..152745bf9aa 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -1,4 +1,5 @@ -# MEGA-LINTER FLAVOR [terraform]: Optimized for TERRAFORM based projects +# syntax=docker/dockerfile:1 +# MEGALINTER FLAVOR [terraform]: Optimized for TERRAFORM based projects ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -197,21 +198,21 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck -COPY --from=shfmt /bin/shfmt /usr/bin/ -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ -COPY --from=tflint /usr/local/bin/tflint /usr/bin/ -COPY --from=terrascan /go/bin/terrascan /usr/bin/ -COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ -COPY --from=terragrunt /bin/terraform /usr/bin/ -COPY --from=kics /app/bin/kics /usr/bin/ +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +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=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ +COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ +COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +COPY --link --from=terragrunt /bin/terraform /usr/bin/ +COPY --link --from=kics /app/bin/kics /usr/bin/ COPY --from=kics /app/bin/assets /opt/kics/assets/ #COPY__END @@ -220,9 +221,9 @@ COPY --from=kics /app/bin/assets /opt/kics/assets/ ############################################################################################# #OTHER__START # actionlint installation -# Managed with COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # bash-exec installation @@ -230,16 +231,16 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # dotenv-linter installation && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \ @@ -269,10 +270,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # trivy installation && wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin \ @@ -286,19 +287,19 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil && find /tmp -path '/tmp/tmp.*' -type f -name 'misspell*' -delete -o -type d -empty -delete \ # tflint installation -# Managed with COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +# Managed with COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ # terrascan installation -# Managed with COPY --from=terrascan /go/bin/terrascan /usr/bin/ +# Managed with COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ # terragrunt installation -# Managed with COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +# Managed with COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ # terraform-fmt installation -# Managed with COPY --from=terragrunt /bin/terraform /usr/bin/ +# Managed with COPY --link --from=terragrunt /bin/terraform /usr/bin/ # kics installation -# Managed with COPY --from=kics /app/bin/kics /usr/bin/ +# Managed with COPY --link --from=kics /app/bin/kics /usr/bin/ && mkdir -p /opt/kics/assets ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries # Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/ diff --git a/linters/ansible_ansible_lint/Dockerfile b/linters/ansible_ansible_lint/Dockerfile index 1c0eb42fa91..2808d5b16c4 100644 --- a/linters/ansible_ansible_lint/Dockerfile +++ b/linters/ansible_ansible_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/bash_shellcheck/Dockerfile b/linters/bash_shellcheck/Dockerfile index 1fe8495dd0a..f7ca34d3f36 100644 --- a/linters/bash_shellcheck/Dockerfile +++ b/linters/bash_shellcheck/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -115,7 +116,7 @@ ENV PATH="/root/.cargo/bin:${PATH}" ############################################################################################# #COPY__START -COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #COPY__END ############################################################################################# @@ -123,7 +124,7 @@ COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck ############################################################################################# #OTHER__START # shellcheck installation -# Managed with COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #OTHER__END diff --git a/linters/cloudformation_cfn_lint/Dockerfile b/linters/cloudformation_cfn_lint/Dockerfile index 8f5ab5da219..56195f318aa 100644 --- a/linters/cloudformation_cfn_lint/Dockerfile +++ b/linters/cloudformation_cfn_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/dockerfile_hadolint/Dockerfile b/linters/dockerfile_hadolint/Dockerfile index 01f921c032b..3cf17ec2cfd 100644 --- a/linters/dockerfile_hadolint/Dockerfile +++ b/linters/dockerfile_hadolint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -111,7 +112,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint #COPY__END ############################################################################################# @@ -119,7 +120,7 @@ COPY --from=hadolint /bin/hadolint /usr/bin/hadolint ############################################################################################# #OTHER__START # hadolint installation -# Managed with COPY --from=hadolint /bin/hadolint /usr/bin/hadolint +# Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint #OTHER__END diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index 72324a427d7..0f8c7658b3f 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -116,7 +117,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=revive /usr/bin/revive /usr/bin/revive +COPY --link --from=revive /usr/bin/revive /usr/bin/revive #COPY__END ############################################################################################# @@ -124,7 +125,7 @@ COPY --from=revive /usr/bin/revive /usr/bin/revive ############################################################################################# #OTHER__START # revive installation -# Managed with COPY --from=revive /usr/bin/revive /usr/bin/revive +# Managed with COPY --link --from=revive /usr/bin/revive /usr/bin/revive #OTHER__END diff --git a/linters/groovy_npm_groovy_lint/Dockerfile b/linters/groovy_npm_groovy_lint/Dockerfile index 1e36202d246..65708a1245c 100644 --- a/linters/groovy_npm_groovy_lint/Dockerfile +++ b/linters/groovy_npm_groovy_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/java_checkstyle/Dockerfile b/linters/java_checkstyle/Dockerfile index 477ad7e1941..beda76bc45e 100644 --- a/linters/java_checkstyle/Dockerfile +++ b/linters/java_checkstyle/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/java_pmd/Dockerfile b/linters/java_pmd/Dockerfile index 698bacd3aae..921a4005460 100644 --- a/linters/java_pmd/Dockerfile +++ b/linters/java_pmd/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/javascript_es/Dockerfile b/linters/javascript_es/Dockerfile index 283d3e61d29..e2c6d7d6f71 100644 --- a/linters/javascript_es/Dockerfile +++ b/linters/javascript_es/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/json_eslint_plugin_jsonc/Dockerfile b/linters/json_eslint_plugin_jsonc/Dockerfile index 64fffe9a61e..5fa34ac59c5 100644 --- a/linters/json_eslint_plugin_jsonc/Dockerfile +++ b/linters/json_eslint_plugin_jsonc/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/jsx_eslint/Dockerfile b/linters/jsx_eslint/Dockerfile index 9b6dd0b0689..db0dfb678c7 100644 --- a/linters/jsx_eslint/Dockerfile +++ b/linters/jsx_eslint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/kotlin_ktlint/Dockerfile b/linters/kotlin_ktlint/Dockerfile index 18ec85c625d..d080f05f596 100644 --- a/linters/kotlin_ktlint/Dockerfile +++ b/linters/kotlin_ktlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/php_psalm/Dockerfile b/linters/php_psalm/Dockerfile index cb0a147b191..9bed5b3d4e2 100644 --- a/linters/php_psalm/Dockerfile +++ b/linters/php_psalm/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_bandit/Dockerfile b/linters/python_bandit/Dockerfile index 7ea206c1553..0462bec2e4e 100644 --- a/linters/python_bandit/Dockerfile +++ b/linters/python_bandit/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_checkov/Dockerfile b/linters/repository_checkov/Dockerfile index ee999c2c258..aa1a3a42a04 100644 --- a/linters/repository_checkov/Dockerfile +++ b/linters/repository_checkov/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_devskim/Dockerfile b/linters/repository_devskim/Dockerfile index b3c53322d0b..28f93c2ac46 100644 --- a/linters/repository_devskim/Dockerfile +++ b/linters/repository_devskim/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_dustilock/Dockerfile b/linters/repository_dustilock/Dockerfile index 67cf87cedaa..792b3b90e1c 100644 --- a/linters/repository_dustilock/Dockerfile +++ b/linters/repository_dustilock/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -113,7 +114,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock +COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock #COPY__END ############################################################################################# @@ -121,7 +122,7 @@ COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock ############################################################################################# #OTHER__START # dustilock installation -# Managed with COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock +# Managed with COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock #OTHER__END diff --git a/linters/repository_gitleaks/Dockerfile b/linters/repository_gitleaks/Dockerfile index 8ac13762de8..156f6b56520 100644 --- a/linters/repository_gitleaks/Dockerfile +++ b/linters/repository_gitleaks/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -111,7 +112,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #COPY__END ############################################################################################# @@ -119,7 +120,7 @@ COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ ############################################################################################# #OTHER__START # gitleaks installation -# Managed with COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ +# Managed with COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__END diff --git a/linters/repository_secretlint/Dockerfile b/linters/repository_secretlint/Dockerfile index c08215b5d7d..faf3e191add 100644 --- a/linters/repository_secretlint/Dockerfile +++ b/linters/repository_secretlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_semgrep/Dockerfile b/linters/repository_semgrep/Dockerfile index abb6d39e010..fd0bf0eafca 100644 --- a/linters/repository_semgrep/Dockerfile +++ b/linters/repository_semgrep/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_syft/Dockerfile b/linters/repository_syft/Dockerfile index 21beedd0448..1103120a7eb 100644 --- a/linters/repository_syft/Dockerfile +++ b/linters/repository_syft/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_trivy/Dockerfile b/linters/repository_trivy/Dockerfile index 3361b53fb84..290b061c71d 100644 --- a/linters/repository_trivy/Dockerfile +++ b/linters/repository_trivy/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/terraform_checkov/Dockerfile b/linters/terraform_checkov/Dockerfile index 070b2d14e5f..3e213ccc160 100644 --- a/linters/terraform_checkov/Dockerfile +++ b/linters/terraform_checkov/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/terraform_terrascan/Dockerfile b/linters/terraform_terrascan/Dockerfile index 56cdea287ff..2e44c12d3cc 100644 --- a/linters/terraform_terrascan/Dockerfile +++ b/linters/terraform_terrascan/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -111,7 +112,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=terrascan /go/bin/terrascan /usr/bin/ +COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ #COPY__END ############################################################################################# @@ -119,7 +120,7 @@ COPY --from=terrascan /go/bin/terrascan /usr/bin/ ############################################################################################# #OTHER__START # terrascan installation -# Managed with COPY --from=terrascan /go/bin/terrascan /usr/bin/ +# Managed with COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ #OTHER__END diff --git a/linters/terraform_tflint/Dockerfile b/linters/terraform_tflint/Dockerfile index 1d5e33503e4..336f1ad4131 100644 --- a/linters/terraform_tflint/Dockerfile +++ b/linters/terraform_tflint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -111,7 +112,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ #COPY__END ############################################################################################# @@ -119,7 +120,7 @@ COPY --from=tflint /usr/local/bin/tflint /usr/bin/ ############################################################################################# #OTHER__START # tflint installation -# Managed with COPY --from=tflint /usr/local/bin/tflint /usr/bin/ +# Managed with COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ #OTHER__END diff --git a/linters/tsx_eslint/Dockerfile b/linters/tsx_eslint/Dockerfile index f2b04d547c3..5e8e760758f 100644 --- a/linters/tsx_eslint/Dockerfile +++ b/linters/tsx_eslint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/typescript_es/Dockerfile b/linters/typescript_es/Dockerfile index c99eaeaccc4..a7ee665e011 100644 --- a/linters/typescript_es/Dockerfile +++ b/linters/typescript_es/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index f2974bf1129..d0514de92c1 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -33,6 +33,6 @@ linters: # shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile FROM koalaman/shellcheck:stable as shellcheck - | - COPY --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint + COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint - COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck diff --git a/megalinter/descriptors/bash.megalinter-descriptor.yml b/megalinter/descriptors/bash.megalinter-descriptor.yml index ecfffba38a1..cf7d39aafa1 100644 --- a/megalinter/descriptors/bash.megalinter-descriptor.yml +++ b/megalinter/descriptors/bash.megalinter-descriptor.yml @@ -75,7 +75,7 @@ linters: dockerfile: # Also update shellcheck version in action.megalinter-descriptor.yml - FROM koalaman/shellcheck:stable as shellcheck - - COPY --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck ide: atom: - name: linter-shellcheck @@ -121,7 +121,7 @@ linters: install: dockerfile: - FROM mvdan/shfmt:latest-alpine as shfmt - - COPY --from=shfmt /bin/shfmt /usr/bin/ + - COPY --link --from=shfmt /bin/shfmt /usr/bin/ ide: atom: - name: format-shell diff --git a/megalinter/descriptors/dockerfile.megalinter-descriptor.yml b/megalinter/descriptors/dockerfile.megalinter-descriptor.yml index 27391205a38..6c421773351 100644 --- a/megalinter/descriptors/dockerfile.megalinter-descriptor.yml +++ b/megalinter/descriptors/dockerfile.megalinter-descriptor.yml @@ -36,7 +36,7 @@ linters: install: dockerfile: - FROM hadolint/hadolint:v2.12.0-alpine as hadolint - - COPY --from=hadolint /bin/hadolint /usr/bin/hadolint + - COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint ide: atom: - name: linter-hadolint diff --git a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml index 32b88b49766..6a3bfa55565 100644 --- a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml +++ b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml @@ -26,4 +26,4 @@ linters: install: dockerfile: - FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker - - COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker + - COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index ecb749460a0..cc227ef3d36 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -76,14 +76,14 @@ linters: dockerfile: ## Until "FROM ghcr.io/mgechev/revive:1.2.5 as revive" is available, use # - FROM ghcr.io/mgechev/revive:1.2.5 as revive - # - COPY --from=revive /usr/bin/revive /usr/bin/revive + # - COPY --link --from=revive /usr/bin/revive /usr/bin/revive - | FROM golang:1.19-alpine as revive ## The golang image used as a builder is a temporary workaround ## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest - - COPY --from=revive /usr/bin/revive /usr/bin/revive + - COPY --link --from=revive /usr/bin/revive /usr/bin/revive ide: atom: - name: linter-revive diff --git a/megalinter/descriptors/latex.megalinter-descriptor.yml b/megalinter/descriptors/latex.megalinter-descriptor.yml index c406e950469..1af447b0010 100644 --- a/megalinter/descriptors/latex.megalinter-descriptor.yml +++ b/megalinter/descriptors/latex.megalinter-descriptor.yml @@ -20,7 +20,7 @@ linters: install: dockerfile: - FROM ghcr.io/assignuser/chktex-alpine:latest as chktex - - COPY --from=chktex /usr/bin/chktex /usr/bin/ + - COPY --link --from=chktex /usr/bin/chktex /usr/bin/ - RUN cd ~ && touch .chktexrc && cd / ide: atom: diff --git a/megalinter/descriptors/makefile.megalinter-descriptor.yml b/megalinter/descriptors/makefile.megalinter-descriptor.yml index 80e8cdb589c..d2ac4686d4c 100644 --- a/megalinter/descriptors/makefile.megalinter-descriptor.yml +++ b/megalinter/descriptors/makefile.megalinter-descriptor.yml @@ -33,4 +33,4 @@ linters: - make dockerfile: - FROM mrtazz/checkmake:latest as checkmake - - COPY --from=checkmake /checkmake /usr/bin/checkmake + - COPY --link --from=checkmake /checkmake /usr/bin/checkmake diff --git a/megalinter/descriptors/protobuf.megalinter-descriptor.yml b/megalinter/descriptors/protobuf.megalinter-descriptor.yml index 9e32ca428af..f6d154ea77f 100644 --- a/megalinter/descriptors/protobuf.megalinter-descriptor.yml +++ b/megalinter/descriptors/protobuf.megalinter-descriptor.yml @@ -26,7 +26,7 @@ linters: install: dockerfile: - FROM yoheimuta/protolint:latest as protolint - - COPY --from=protolint /usr/local/bin/protolint /usr/bin/ + - COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ ide: idea: - name: Protocol Buffer Linter diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index a56f36eee47..2ce312eeefa 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -127,7 +127,7 @@ linters: - | FROM golang:alpine as dustilock RUN GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v1.2.0 - - COPY --from=dustilock /usr/bin/dustilock /usr/bin/dustilock + - COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock # GIT_DIFF - linter_name: git_diff @@ -189,7 +189,7 @@ linters: install: dockerfile: - FROM zricethezav/gitleaks:v8.15.3 as gitleaks - - COPY --from=gitleaks /usr/bin/gitleaks /usr/bin/ + - COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ # GOODCHECK - linter_name: goodcheck diff --git a/megalinter/descriptors/terraform.megalinter-descriptor.yml b/megalinter/descriptors/terraform.megalinter-descriptor.yml index 65efabb7ad5..f68047b2854 100644 --- a/megalinter/descriptors/terraform.megalinter-descriptor.yml +++ b/megalinter/descriptors/terraform.megalinter-descriptor.yml @@ -30,7 +30,7 @@ linters: install: dockerfile: - FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint - - COPY --from=tflint /usr/local/bin/tflint /usr/bin/ + - COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ # TERRASCAN - class: TerrascanLinter linter_name: terrascan @@ -67,7 +67,7 @@ linters: install: dockerfile: - FROM tenable/terrascan:1.18.0 as terrascan - - COPY --from=terrascan /go/bin/terrascan /usr/bin/ + - COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ # TERRAGRUNT - linter_name: terragrunt name: TERRAFORM_TERRAGRUNT @@ -100,7 +100,7 @@ linters: install: dockerfile: - FROM alpine/terragrunt:latest as terragrunt - - COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ + - COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ # TERRAFORM_FMT - linter_name: terraform-fmt name: TERRAFORM_TERRAFORM_FMT @@ -122,7 +122,7 @@ linters: install: dockerfile: - FROM alpine/terragrunt:latest as terragrunt - - COPY --from=terragrunt /bin/terraform /usr/bin/ + - COPY --link --from=terragrunt /bin/terraform /usr/bin/ ide: atom: - name: terraform-fmt @@ -194,7 +194,7 @@ linters: install: dockerfile: - FROM checkmarx/kics:alpine as kics - - COPY --from=kics /app/bin/kics /usr/bin/ + - COPY --link --from=kics /app/bin/kics /usr/bin/ - RUN mkdir -p /opt/kics/assets - ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries - COPY --from=kics /app/bin/assets /opt/kics/assets/ From 2f6ca9fedd0d89719f91ed4980310fa3b49d2ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 18 Feb 2023 22:02:15 +0000 Subject: [PATCH 12/18] Revert: Remove unneeded GOPATH and GOROOT variables --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d28ec0d323..cec1578301a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,12 +132,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## From 3ac4086f016860a3b45c07d6fafb82ed25b39b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 18 Feb 2023 22:24:00 +0000 Subject: [PATCH 13/18] Run build.sh --- flavors/ci_light/Dockerfile | 13 ++++++++----- flavors/cupcake/Dockerfile | 13 ++++++++----- flavors/documentation/Dockerfile | 13 ++++++++----- flavors/dotnet/Dockerfile | 13 ++++++++----- flavors/go/Dockerfile | 13 ++++++++----- flavors/java/Dockerfile | 13 ++++++++----- flavors/javascript/Dockerfile | 13 ++++++++----- flavors/php/Dockerfile | 13 ++++++++----- flavors/python/Dockerfile | 13 ++++++++----- flavors/ruby/Dockerfile | 13 ++++++++----- flavors/rust/Dockerfile | 13 ++++++++----- flavors/salesforce/Dockerfile | 13 ++++++++----- flavors/security/Dockerfile | 13 ++++++++----- flavors/swift/Dockerfile | 13 ++++++++----- flavors/terraform/Dockerfile | 13 ++++++++----- linters/ansible_ansible_lint/Dockerfile | 13 ++++++++----- linters/bash_shellcheck/Dockerfile | 13 ++++++++----- linters/cloudformation_cfn_lint/Dockerfile | 13 ++++++++----- linters/dockerfile_hadolint/Dockerfile | 13 ++++++++----- linters/go_revive/Dockerfile | 13 ++++++++----- linters/groovy_npm_groovy_lint/Dockerfile | 13 ++++++++----- linters/java_checkstyle/Dockerfile | 13 ++++++++----- linters/java_pmd/Dockerfile | 13 ++++++++----- linters/javascript_es/Dockerfile | 13 ++++++++----- linters/json_eslint_plugin_jsonc/Dockerfile | 13 ++++++++----- linters/jsx_eslint/Dockerfile | 13 ++++++++----- linters/kotlin_ktlint/Dockerfile | 13 ++++++++----- linters/php_psalm/Dockerfile | 13 ++++++++----- linters/python_bandit/Dockerfile | 13 ++++++++----- linters/repository_checkov/Dockerfile | 13 ++++++++----- linters/repository_devskim/Dockerfile | 13 ++++++++----- linters/repository_dustilock/Dockerfile | 13 ++++++++----- linters/repository_gitleaks/Dockerfile | 13 ++++++++----- linters/repository_secretlint/Dockerfile | 13 ++++++++----- linters/repository_semgrep/Dockerfile | 13 ++++++++----- linters/repository_syft/Dockerfile | 13 ++++++++----- linters/repository_trivy/Dockerfile | 13 ++++++++----- linters/terraform_checkov/Dockerfile | 13 ++++++++----- linters/terraform_terrascan/Dockerfile | 13 ++++++++----- linters/terraform_tflint/Dockerfile | 13 ++++++++----- linters/tsx_eslint/Dockerfile | 13 ++++++++----- linters/typescript_es/Dockerfile | 13 ++++++++----- 42 files changed, 336 insertions(+), 210 deletions(-) diff --git a/flavors/ci_light/Dockerfile b/flavors/ci_light/Dockerfile index b2ca24fb724..b2f582870d4 100644 --- a/flavors/ci_light/Dockerfile +++ b/flavors/ci_light/Dockerfile @@ -69,12 +69,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 5995af853d4..544038308ce 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -99,12 +99,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index c83198e3b76..0f360ee3911 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -77,12 +77,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 0b8cff5642a..144ae157b0b 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -93,12 +93,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 8a58080b8b5..968411b56aa 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -82,12 +82,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index aa103188c4a..82a73cd82fd 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -77,12 +77,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index 6888276c42d..e20f0b07b34 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -76,12 +76,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index a7fee1b969e..0e7f97cb109 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -87,12 +87,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 45ce22e8074..0e59a061e88 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -76,12 +76,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index a837214b2e5..c64c4830953 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -75,12 +75,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 5162735a509..ec412e41c8a 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -75,12 +75,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 0b382b5b104..94ba1b71a19 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -75,12 +75,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 25344ef1323..3f836600b7d 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -72,12 +72,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 640f4542bfc..1577e094dae 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -77,12 +77,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 152745bf9aa..03446388721 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -79,12 +79,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/ansible_ansible_lint/Dockerfile b/linters/ansible_ansible_lint/Dockerfile index 2808d5b16c4..b6d7a2998df 100644 --- a/linters/ansible_ansible_lint/Dockerfile +++ b/linters/ansible_ansible_lint/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/bash_shellcheck/Dockerfile b/linters/bash_shellcheck/Dockerfile index f7ca34d3f36..4991a003210 100644 --- a/linters/bash_shellcheck/Dockerfile +++ b/linters/bash_shellcheck/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/cloudformation_cfn_lint/Dockerfile b/linters/cloudformation_cfn_lint/Dockerfile index 56195f318aa..d619c576045 100644 --- a/linters/cloudformation_cfn_lint/Dockerfile +++ b/linters/cloudformation_cfn_lint/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/dockerfile_hadolint/Dockerfile b/linters/dockerfile_hadolint/Dockerfile index 3cf17ec2cfd..5b68a6105a1 100644 --- a/linters/dockerfile_hadolint/Dockerfile +++ b/linters/dockerfile_hadolint/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/go_revive/Dockerfile b/linters/go_revive/Dockerfile index 0f8c7658b3f..3ca98b6d4ee 100644 --- a/linters/go_revive/Dockerfile +++ b/linters/go_revive/Dockerfile @@ -56,12 +56,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/groovy_npm_groovy_lint/Dockerfile b/linters/groovy_npm_groovy_lint/Dockerfile index 65708a1245c..801738f040b 100644 --- a/linters/groovy_npm_groovy_lint/Dockerfile +++ b/linters/groovy_npm_groovy_lint/Dockerfile @@ -55,12 +55,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/java_checkstyle/Dockerfile b/linters/java_checkstyle/Dockerfile index beda76bc45e..dfd59dd1fe8 100644 --- a/linters/java_checkstyle/Dockerfile +++ b/linters/java_checkstyle/Dockerfile @@ -52,12 +52,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/java_pmd/Dockerfile b/linters/java_pmd/Dockerfile index 921a4005460..c0971faaf76 100644 --- a/linters/java_pmd/Dockerfile +++ b/linters/java_pmd/Dockerfile @@ -52,12 +52,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/javascript_es/Dockerfile b/linters/javascript_es/Dockerfile index e2c6d7d6f71..a275479f2a7 100644 --- a/linters/javascript_es/Dockerfile +++ b/linters/javascript_es/Dockerfile @@ -54,12 +54,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/json_eslint_plugin_jsonc/Dockerfile b/linters/json_eslint_plugin_jsonc/Dockerfile index 5fa34ac59c5..4452aa39319 100644 --- a/linters/json_eslint_plugin_jsonc/Dockerfile +++ b/linters/json_eslint_plugin_jsonc/Dockerfile @@ -54,12 +54,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/jsx_eslint/Dockerfile b/linters/jsx_eslint/Dockerfile index db0dfb678c7..4ff8cc764c2 100644 --- a/linters/jsx_eslint/Dockerfile +++ b/linters/jsx_eslint/Dockerfile @@ -54,12 +54,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/kotlin_ktlint/Dockerfile b/linters/kotlin_ktlint/Dockerfile index d080f05f596..29d6abbf90f 100644 --- a/linters/kotlin_ktlint/Dockerfile +++ b/linters/kotlin_ktlint/Dockerfile @@ -52,12 +52,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/php_psalm/Dockerfile b/linters/php_psalm/Dockerfile index 9bed5b3d4e2..d09a6e77026 100644 --- a/linters/php_psalm/Dockerfile +++ b/linters/php_psalm/Dockerfile @@ -63,12 +63,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/python_bandit/Dockerfile b/linters/python_bandit/Dockerfile index 0462bec2e4e..11fc1088852 100644 --- a/linters/python_bandit/Dockerfile +++ b/linters/python_bandit/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_checkov/Dockerfile b/linters/repository_checkov/Dockerfile index aa1a3a42a04..a895c67c99b 100644 --- a/linters/repository_checkov/Dockerfile +++ b/linters/repository_checkov/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_devskim/Dockerfile b/linters/repository_devskim/Dockerfile index 28f93c2ac46..0add853ac2a 100644 --- a/linters/repository_devskim/Dockerfile +++ b/linters/repository_devskim/Dockerfile @@ -59,12 +59,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_dustilock/Dockerfile b/linters/repository_dustilock/Dockerfile index 792b3b90e1c..93fcc54c11d 100644 --- a/linters/repository_dustilock/Dockerfile +++ b/linters/repository_dustilock/Dockerfile @@ -53,12 +53,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_gitleaks/Dockerfile b/linters/repository_gitleaks/Dockerfile index 156f6b56520..ae44a0f9cf8 100644 --- a/linters/repository_gitleaks/Dockerfile +++ b/linters/repository_gitleaks/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_secretlint/Dockerfile b/linters/repository_secretlint/Dockerfile index faf3e191add..76797686215 100644 --- a/linters/repository_secretlint/Dockerfile +++ b/linters/repository_secretlint/Dockerfile @@ -54,12 +54,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_semgrep/Dockerfile b/linters/repository_semgrep/Dockerfile index fd0bf0eafca..11467848ae0 100644 --- a/linters/repository_semgrep/Dockerfile +++ b/linters/repository_semgrep/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_syft/Dockerfile b/linters/repository_syft/Dockerfile index 1103120a7eb..af2950d5d2e 100644 --- a/linters/repository_syft/Dockerfile +++ b/linters/repository_syft/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/repository_trivy/Dockerfile b/linters/repository_trivy/Dockerfile index 290b061c71d..29f59a4a3c7 100644 --- a/linters/repository_trivy/Dockerfile +++ b/linters/repository_trivy/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_checkov/Dockerfile b/linters/terraform_checkov/Dockerfile index 3e213ccc160..4c30fbb6cfe 100644 --- a/linters/terraform_checkov/Dockerfile +++ b/linters/terraform_checkov/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_terrascan/Dockerfile b/linters/terraform_terrascan/Dockerfile index 2e44c12d3cc..b0020f3ccd9 100644 --- a/linters/terraform_terrascan/Dockerfile +++ b/linters/terraform_terrascan/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/terraform_tflint/Dockerfile b/linters/terraform_tflint/Dockerfile index 336f1ad4131..b31266d2f3d 100644 --- a/linters/terraform_tflint/Dockerfile +++ b/linters/terraform_tflint/Dockerfile @@ -51,12 +51,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/tsx_eslint/Dockerfile b/linters/tsx_eslint/Dockerfile index 5e8e760758f..6534bec4231 100644 --- a/linters/tsx_eslint/Dockerfile +++ b/linters/tsx_eslint/Dockerfile @@ -54,12 +54,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## diff --git a/linters/typescript_es/Dockerfile b/linters/typescript_es/Dockerfile index a7ee665e011..b93c1a7ab2c 100644 --- a/linters/typescript_es/Dockerfile +++ b/linters/typescript_es/Dockerfile @@ -54,12 +54,15 @@ RUN apk add --update --no-cache \ && git config --global core.autocrlf true #APK__END -# PATH for python -# ENV # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ +# PATH for golang & python +ENV GOROOT=/usr/lib/go \ + GOPATH=/go + # PYTHONPYCACHEPREFIX="$HOME/.cache/cpython/" NV: not working for all packages :/ # hadolint ignore=DL3044 -# ENV PATH="$PATH" -# Ignore npm package issues -RUN yarn config set ignore-engines true || true +ENV PATH="$PATH":"$GOROOT"/bin:"$GOPATH"/bin +RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ + # Ignore npm package issues + yarn config set ignore-engines true || true ############################################################################################# ## @generated by .automation/build.py using descriptor files, please do not update manually ## From 4c149d7ba2dd95cea5ef3c11466c50e4b6184b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 18 Feb 2023 22:44:26 +0000 Subject: [PATCH 14/18] Run ./build.sh after rebase --- Dockerfile | 4 ++-- flavors/cupcake/Dockerfile | 6 ++++-- flavors/documentation/Dockerfile | 1 - flavors/dotnet/Dockerfile | 1 - flavors/java/Dockerfile | 1 - flavors/javascript/Dockerfile | 1 - linters/action_actionlint/Dockerfile | 15 ++++++++++++--- linters/arm_arm_ttk/Dockerfile | 1 + linters/bash_exec/Dockerfile | 1 + linters/bash_shfmt/Dockerfile | 5 +++-- linters/bicep_bicep_linter/Dockerfile | 1 + linters/c_cpplint/Dockerfile | 1 + linters/clojure_clj_kondo/Dockerfile | 1 + linters/coffee_coffeelint/Dockerfile | 1 + linters/copypaste_jscpd/Dockerfile | 1 + linters/cpp_cpplint/Dockerfile | 1 + linters/csharp_csharpier/Dockerfile | 1 + linters/csharp_dotnet_format/Dockerfile | 1 + linters/css_scss_lint/Dockerfile | 1 + linters/css_stylelint/Dockerfile | 1 + linters/dart_dartanalyzer/Dockerfile | 1 + .../editorconfig_editorconfig_checker/Dockerfile | 5 +++-- linters/env_dotenv_linter/Dockerfile | 1 + linters/gherkin_gherkin_lint/Dockerfile | 1 + linters/go_golangci_lint/Dockerfile | 2 +- linters/graphql_graphql_schema_linter/Dockerfile | 1 + linters/html_djlint/Dockerfile | 1 + linters/html_htmlhint/Dockerfile | 1 + linters/javascript_prettier/Dockerfile | 1 + linters/javascript_standard/Dockerfile | 1 + linters/json_jsonlint/Dockerfile | 1 + linters/json_npm_package_json_lint/Dockerfile | 1 + linters/json_prettier/Dockerfile | 1 + linters/json_v8r/Dockerfile | 1 + linters/kubernetes_kubeconform/Dockerfile | 1 + linters/kubernetes_kubeval/Dockerfile | 1 + linters/latex_chktex/Dockerfile | 5 +++-- linters/lua_luacheck/Dockerfile | 1 + linters/makefile_checkmake/Dockerfile | 10 ++++------ linters/markdown_markdown_link_check/Dockerfile | 1 + .../markdown_markdown_table_formatter/Dockerfile | 1 + linters/markdown_markdownlint/Dockerfile | 1 + linters/markdown_remark_lint/Dockerfile | 1 + linters/openapi_spectral/Dockerfile | 1 + linters/perl_perlcritic/Dockerfile | 1 + linters/php_phpcs/Dockerfile | 1 + linters/php_phplint/Dockerfile | 1 + linters/php_phpstan/Dockerfile | 1 + linters/powershell_powershell/Dockerfile | 1 + .../powershell_powershell_formatter/Dockerfile | 1 + linters/protobuf_protolint/Dockerfile | 5 +++-- linters/puppet_puppet_lint/Dockerfile | 1 + linters/python_black/Dockerfile | 1 + linters/python_flake8/Dockerfile | 1 + linters/python_isort/Dockerfile | 1 + linters/python_mypy/Dockerfile | 1 + linters/python_pylint/Dockerfile | 1 + linters/python_pyright/Dockerfile | 1 + linters/r_lintr/Dockerfile | 1 + linters/raku_raku/Dockerfile | 1 + linters/repository_git_diff/Dockerfile | 1 + linters/repository_goodcheck/Dockerfile | 1 + linters/rst_rst_lint/Dockerfile | 1 + linters/rst_rstcheck/Dockerfile | 1 + linters/rst_rstfmt/Dockerfile | 1 + linters/ruby_rubocop/Dockerfile | 1 + linters/rust_clippy/Dockerfile | 1 + linters/salesforce_sfdx_scanner_apex/Dockerfile | 1 + linters/salesforce_sfdx_scanner_aura/Dockerfile | 1 + linters/salesforce_sfdx_scanner_lwc/Dockerfile | 1 + linters/scala_scalafix/Dockerfile | 1 + linters/snakemake_lint/Dockerfile | 1 + linters/snakemake_snakefmt/Dockerfile | 1 + linters/spell_cspell/Dockerfile | 1 + linters/spell_misspell/Dockerfile | 1 + linters/spell_proselint/Dockerfile | 1 + linters/sql_sql_lint/Dockerfile | 1 + linters/sql_sqlfluff/Dockerfile | 1 + linters/sql_tsqllint/Dockerfile | 1 + linters/swift_swiftlint/Dockerfile | 1 + linters/tekton_tekton_lint/Dockerfile | 1 + linters/terraform_kics/Dockerfile | 5 +++-- linters/terraform_terraform_fmt/Dockerfile | 5 +++-- linters/terraform_terragrunt/Dockerfile | 5 +++-- linters/typescript_prettier/Dockerfile | 1 + linters/typescript_standard/Dockerfile | 1 + linters/vbdotnet_dotnet_format/Dockerfile | 1 + linters/xml_xmllint/Dockerfile | 1 + linters/yaml_prettier/Dockerfile | 1 + linters/yaml_v8r/Dockerfile | 1 + linters/yaml_yamllint/Dockerfile | 1 + 91 files changed, 119 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index cec1578301a..8c8254e1aa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,7 +109,6 @@ RUN apk add --update --no-cache \ composer \ dpkg \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ @@ -461,7 +460,8 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ # golangci-lint installation && wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \ - && golangci-lint --version \ + && golangci-lint --version + # revive installation # Managed with COPY --link --from=revive /usr/bin/revive /usr/bin/revive diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 544038308ce..3a346346727 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -333,7 +333,8 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil # golangci-lint installation && wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \ - && golangci-lint --version \ + && golangci-lint --version + # revive installation # Managed with COPY --link --from=revive /usr/bin/revive /usr/bin/revive @@ -379,7 +380,8 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P && tar xf ${ML_THIRD_PARTY_DIR}/kubeconform-linux-amd64.tar.gz --directory ${ML_THIRD_PARTY_DIR} \ && mv ${ML_THIRD_PARTY_DIR}/kubeconform /usr/local/bin \ && rm ${ML_THIRD_PARTY_DIR}/kubeconform-linux-amd64.tar.gz \ - && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ + && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete + # checkmake installation # Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index 0f360ee3911..a470f314493 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -61,7 +61,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 144ae157b0b..08dc1e9bfde 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -77,7 +77,6 @@ RUN apk add --update --no-cache \ zlib-dev \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 82a73cd82fd..dbc7722afb2 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -61,7 +61,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index e20f0b07b34..499afa1ea88 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -60,7 +60,6 @@ RUN apk add --update --no-cache \ openssh \ openjdk11 \ py3-pyflakes \ - go \ nodejs \ npm \ yarn \ diff --git a/linters/action_actionlint/Dockerfile b/linters/action_actionlint/Dockerfile index 9637ac63a03..bdd53820fa4 100644 --- a/linters/action_actionlint/Dockerfile +++ b/linters/action_actionlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -10,6 +11,9 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START +FROM rhysd/actionlint:latest as actionlint +# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile +FROM koalaman/shellcheck:stable as shellcheck #FROM__END @@ -47,7 +51,7 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ + py3-pyflakes \ && git config --global core.autocrlf true #APK__END @@ -115,6 +119,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #COPY__END @@ -123,8 +130,10 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # actionlint installation -ENV GO111MODULE=on -RUN go install github.com/rhysd/actionlint/cmd/actionlint@latest && go clean --cache +# Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint +# shellcheck is a dependency for actionlint +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + #OTHER__END diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index 97f891e9194..aad31853a9d 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/bash_exec/Dockerfile b/linters/bash_exec/Dockerfile index 7350258ac55..8ade4f870af 100644 --- a/linters/bash_exec/Dockerfile +++ b/linters/bash_exec/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/bash_shfmt/Dockerfile b/linters/bash_shfmt/Dockerfile index b4634319892..4bf3553df2a 100644 --- a/linters/bash_shfmt/Dockerfile +++ b/linters/bash_shfmt/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=shfmt /bin/shfmt /usr/bin/ +COPY --link --from=shfmt /bin/shfmt /usr/bin/ #COPY__END ############################################################################################# @@ -122,7 +123,7 @@ COPY --from=shfmt /bin/shfmt /usr/bin/ ############################################################################################# #OTHER__START # shfmt installation -# Managed with COPY --from=shfmt /bin/shfmt /usr/bin/ +# Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ #OTHER__END diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile index 327a410f786..7760d64a501 100644 --- a/linters/bicep_bicep_linter/Dockerfile +++ b/linters/bicep_bicep_linter/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/c_cpplint/Dockerfile b/linters/c_cpplint/Dockerfile index ffaa660617f..18fccfd0498 100644 --- a/linters/c_cpplint/Dockerfile +++ b/linters/c_cpplint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index 69095636e00..7bd99e50199 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/coffee_coffeelint/Dockerfile b/linters/coffee_coffeelint/Dockerfile index 254f8e83280..de13718f1a8 100644 --- a/linters/coffee_coffeelint/Dockerfile +++ b/linters/coffee_coffeelint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/copypaste_jscpd/Dockerfile b/linters/copypaste_jscpd/Dockerfile index 0ae8b9c358c..be722efb34e 100644 --- a/linters/copypaste_jscpd/Dockerfile +++ b/linters/copypaste_jscpd/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/cpp_cpplint/Dockerfile b/linters/cpp_cpplint/Dockerfile index 2e62cd0235e..c79b99f77ee 100644 --- a/linters/cpp_cpplint/Dockerfile +++ b/linters/cpp_cpplint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile index a05fa9000ac..516a286079a 100644 --- a/linters/csharp_csharpier/Dockerfile +++ b/linters/csharp_csharpier/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index 091728b6864..aa932b33e94 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/css_scss_lint/Dockerfile b/linters/css_scss_lint/Dockerfile index 79c8066286c..1df1dc7f3d7 100644 --- a/linters/css_scss_lint/Dockerfile +++ b/linters/css_scss_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/css_stylelint/Dockerfile b/linters/css_stylelint/Dockerfile index 6b3c6ed7848..38041fbc098 100644 --- a/linters/css_stylelint/Dockerfile +++ b/linters/css_stylelint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index 3500bca11a6..032d6bc312b 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/editorconfig_editorconfig_checker/Dockerfile b/linters/editorconfig_editorconfig_checker/Dockerfile index 9188e66a5e6..083951678f4 100644 --- a/linters/editorconfig_editorconfig_checker/Dockerfile +++ b/linters/editorconfig_editorconfig_checker/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker #COPY__END ############################################################################################# @@ -122,7 +123,7 @@ COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker ############################################################################################# #OTHER__START # editorconfig-checker installation -# Managed with COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker #OTHER__END diff --git a/linters/env_dotenv_linter/Dockerfile b/linters/env_dotenv_linter/Dockerfile index 7023184beba..49ebc6542f9 100644 --- a/linters/env_dotenv_linter/Dockerfile +++ b/linters/env_dotenv_linter/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/gherkin_gherkin_lint/Dockerfile b/linters/gherkin_gherkin_lint/Dockerfile index cad1d9fe928..452b819b210 100644 --- a/linters/gherkin_gherkin_lint/Dockerfile +++ b/linters/gherkin_gherkin_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/go_golangci_lint/Dockerfile b/linters/go_golangci_lint/Dockerfile index 712074a301b..b63629f6bd0 100644 --- a/linters/go_golangci_lint/Dockerfile +++ b/linters/go_golangci_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -47,7 +48,6 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ - go \ && git config --global core.autocrlf true #APK__END diff --git a/linters/graphql_graphql_schema_linter/Dockerfile b/linters/graphql_graphql_schema_linter/Dockerfile index 565b5a23c67..c4f86cf8a0a 100644 --- a/linters/graphql_graphql_schema_linter/Dockerfile +++ b/linters/graphql_graphql_schema_linter/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/html_djlint/Dockerfile b/linters/html_djlint/Dockerfile index 24d1561f6e4..09d5ad59da4 100644 --- a/linters/html_djlint/Dockerfile +++ b/linters/html_djlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/html_htmlhint/Dockerfile b/linters/html_htmlhint/Dockerfile index dd248e25044..6472fe66e5e 100644 --- a/linters/html_htmlhint/Dockerfile +++ b/linters/html_htmlhint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/javascript_prettier/Dockerfile b/linters/javascript_prettier/Dockerfile index 6d974a979ed..59b90a737af 100644 --- a/linters/javascript_prettier/Dockerfile +++ b/linters/javascript_prettier/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/javascript_standard/Dockerfile b/linters/javascript_standard/Dockerfile index ef0fde8c332..c964b66310e 100644 --- a/linters/javascript_standard/Dockerfile +++ b/linters/javascript_standard/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/json_jsonlint/Dockerfile b/linters/json_jsonlint/Dockerfile index 90422e71b2a..557553d0ca9 100644 --- a/linters/json_jsonlint/Dockerfile +++ b/linters/json_jsonlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/json_npm_package_json_lint/Dockerfile b/linters/json_npm_package_json_lint/Dockerfile index d89e4b82670..0d919c0f9e9 100644 --- a/linters/json_npm_package_json_lint/Dockerfile +++ b/linters/json_npm_package_json_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/json_prettier/Dockerfile b/linters/json_prettier/Dockerfile index ccea1450e3f..a17c586a923 100644 --- a/linters/json_prettier/Dockerfile +++ b/linters/json_prettier/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/json_v8r/Dockerfile b/linters/json_v8r/Dockerfile index 9a8df024577..fc5f4a7892e 100644 --- a/linters/json_v8r/Dockerfile +++ b/linters/json_v8r/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/kubernetes_kubeconform/Dockerfile b/linters/kubernetes_kubeconform/Dockerfile index f092e5128cc..d2f700f0c04 100644 --- a/linters/kubernetes_kubeconform/Dockerfile +++ b/linters/kubernetes_kubeconform/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/kubernetes_kubeval/Dockerfile b/linters/kubernetes_kubeval/Dockerfile index fc7dfe8a21d..6da11c262f8 100644 --- a/linters/kubernetes_kubeval/Dockerfile +++ b/linters/kubernetes_kubeval/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/latex_chktex/Dockerfile b/linters/latex_chktex/Dockerfile index 1b95712b4b7..9aaff70b691 100644 --- a/linters/latex_chktex/Dockerfile +++ b/linters/latex_chktex/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=chktex /usr/bin/chktex /usr/bin/ +COPY --link --from=chktex /usr/bin/chktex /usr/bin/ #COPY__END ############################################################################################# @@ -122,7 +123,7 @@ COPY --from=chktex /usr/bin/chktex /usr/bin/ ############################################################################################# #OTHER__START # chktex installation -# Managed with COPY --from=chktex /usr/bin/chktex /usr/bin/ +# Managed with COPY --link --from=chktex /usr/bin/chktex /usr/bin/ RUN cd ~ && touch .chktexrc && cd / #OTHER__END diff --git a/linters/lua_luacheck/Dockerfile b/linters/lua_luacheck/Dockerfile index 76fc2fb94e1..3fa34d6f0c9 100644 --- a/linters/lua_luacheck/Dockerfile +++ b/linters/lua_luacheck/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/makefile_checkmake/Dockerfile b/linters/makefile_checkmake/Dockerfile index b6a85be7ba2..c063e42ec6d 100644 --- a/linters/makefile_checkmake/Dockerfile +++ b/linters/makefile_checkmake/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -10,7 +11,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM mrtazz/checkmake:latest as checkmake #FROM__END ################## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START - +COPY --link --from=checkmake /checkmake /usr/bin/checkmake #COPY__END ############################################################################################# @@ -122,10 +123,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # checkmake installation -RUN ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \ - && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \ - && chmod 755 /usr/local/bin/checkmake - +# Managed with COPY --link --from=checkmake /checkmake /usr/bin/checkmake #OTHER__END diff --git a/linters/markdown_markdown_link_check/Dockerfile b/linters/markdown_markdown_link_check/Dockerfile index 2d29db31fd6..6e7f600643a 100644 --- a/linters/markdown_markdown_link_check/Dockerfile +++ b/linters/markdown_markdown_link_check/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/markdown_markdown_table_formatter/Dockerfile b/linters/markdown_markdown_table_formatter/Dockerfile index 4ddac0f0078..e1592d21770 100644 --- a/linters/markdown_markdown_table_formatter/Dockerfile +++ b/linters/markdown_markdown_table_formatter/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/markdown_markdownlint/Dockerfile b/linters/markdown_markdownlint/Dockerfile index 37fd7b1bbe2..7965e9d7613 100644 --- a/linters/markdown_markdownlint/Dockerfile +++ b/linters/markdown_markdownlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/markdown_remark_lint/Dockerfile b/linters/markdown_remark_lint/Dockerfile index d403e69b831..a51d3afdb37 100644 --- a/linters/markdown_remark_lint/Dockerfile +++ b/linters/markdown_remark_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/openapi_spectral/Dockerfile b/linters/openapi_spectral/Dockerfile index 8186b1604dc..a1b18f8e6ff 100644 --- a/linters/openapi_spectral/Dockerfile +++ b/linters/openapi_spectral/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/perl_perlcritic/Dockerfile b/linters/perl_perlcritic/Dockerfile index bfae4ff795c..99a82b6c376 100644 --- a/linters/perl_perlcritic/Dockerfile +++ b/linters/perl_perlcritic/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/php_phpcs/Dockerfile b/linters/php_phpcs/Dockerfile index a5950c0f701..9a2c7cbd1d4 100644 --- a/linters/php_phpcs/Dockerfile +++ b/linters/php_phpcs/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/php_phplint/Dockerfile b/linters/php_phplint/Dockerfile index d54e64ec2fa..6a46899a170 100644 --- a/linters/php_phplint/Dockerfile +++ b/linters/php_phplint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/php_phpstan/Dockerfile b/linters/php_phpstan/Dockerfile index c0dc5c090a3..e299aace5a5 100644 --- a/linters/php_phpstan/Dockerfile +++ b/linters/php_phpstan/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index aaeb579ea05..2eea5f161e9 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile index 84f62455be0..65ec2453315 100644 --- a/linters/powershell_powershell_formatter/Dockerfile +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/protobuf_protolint/Dockerfile b/linters/protobuf_protolint/Dockerfile index 2092d97336e..6ca24ed1c14 100644 --- a/linters/protobuf_protolint/Dockerfile +++ b/linters/protobuf_protolint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ #COPY__END ############################################################################################# @@ -122,7 +123,7 @@ COPY --from=protolint /usr/local/bin/protolint /usr/bin/ ############################################################################################# #OTHER__START # protolint installation -# Managed with COPY --from=protolint /usr/local/bin/protolint /usr/bin/ +# Managed with COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ #OTHER__END diff --git a/linters/puppet_puppet_lint/Dockerfile b/linters/puppet_puppet_lint/Dockerfile index 3c8191a8395..72d07f0eb77 100644 --- a/linters/puppet_puppet_lint/Dockerfile +++ b/linters/puppet_puppet_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_black/Dockerfile b/linters/python_black/Dockerfile index b366527492d..79e413f2044 100644 --- a/linters/python_black/Dockerfile +++ b/linters/python_black/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_flake8/Dockerfile b/linters/python_flake8/Dockerfile index c0fdf8685d7..f8920d93e4c 100644 --- a/linters/python_flake8/Dockerfile +++ b/linters/python_flake8/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_isort/Dockerfile b/linters/python_isort/Dockerfile index fcf914c93f2..251f475b6ad 100644 --- a/linters/python_isort/Dockerfile +++ b/linters/python_isort/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_mypy/Dockerfile b/linters/python_mypy/Dockerfile index c7b4114ba7f..ea0a191a58b 100644 --- a/linters/python_mypy/Dockerfile +++ b/linters/python_mypy/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_pylint/Dockerfile b/linters/python_pylint/Dockerfile index 7c8cd2869aa..d1e235daa50 100644 --- a/linters/python_pylint/Dockerfile +++ b/linters/python_pylint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/python_pyright/Dockerfile b/linters/python_pyright/Dockerfile index 8ff2432e11f..fcd2281f75d 100644 --- a/linters/python_pyright/Dockerfile +++ b/linters/python_pyright/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/r_lintr/Dockerfile b/linters/r_lintr/Dockerfile index 16b84aeddda..377eccc00e5 100644 --- a/linters/r_lintr/Dockerfile +++ b/linters/r_lintr/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/raku_raku/Dockerfile b/linters/raku_raku/Dockerfile index d22de046e56..1f83d2a5683 100644 --- a/linters/raku_raku/Dockerfile +++ b/linters/raku_raku/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_git_diff/Dockerfile b/linters/repository_git_diff/Dockerfile index c4e2543e76e..ce4c9ebd794 100644 --- a/linters/repository_git_diff/Dockerfile +++ b/linters/repository_git_diff/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/repository_goodcheck/Dockerfile b/linters/repository_goodcheck/Dockerfile index 77acbf553bc..e29026ce481 100644 --- a/linters/repository_goodcheck/Dockerfile +++ b/linters/repository_goodcheck/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/rst_rst_lint/Dockerfile b/linters/rst_rst_lint/Dockerfile index ce68a79a94b..4415755483d 100644 --- a/linters/rst_rst_lint/Dockerfile +++ b/linters/rst_rst_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/rst_rstcheck/Dockerfile b/linters/rst_rstcheck/Dockerfile index bc4d1534709..acb916d949e 100644 --- a/linters/rst_rstcheck/Dockerfile +++ b/linters/rst_rstcheck/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/rst_rstfmt/Dockerfile b/linters/rst_rstfmt/Dockerfile index 0ca3d9b1466..6bbe2e8814b 100644 --- a/linters/rst_rstfmt/Dockerfile +++ b/linters/rst_rstfmt/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/ruby_rubocop/Dockerfile b/linters/ruby_rubocop/Dockerfile index 17dea4378dd..b6fa916a2be 100644 --- a/linters/ruby_rubocop/Dockerfile +++ b/linters/ruby_rubocop/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/rust_clippy/Dockerfile b/linters/rust_clippy/Dockerfile index 1bc8e4c6bab..69acbba42bd 100644 --- a/linters/rust_clippy/Dockerfile +++ b/linters/rust_clippy/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/salesforce_sfdx_scanner_apex/Dockerfile b/linters/salesforce_sfdx_scanner_apex/Dockerfile index c9373bb6485..cb426800784 100644 --- a/linters/salesforce_sfdx_scanner_apex/Dockerfile +++ b/linters/salesforce_sfdx_scanner_apex/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/salesforce_sfdx_scanner_aura/Dockerfile b/linters/salesforce_sfdx_scanner_aura/Dockerfile index b58a6b1c051..460d30f0f81 100644 --- a/linters/salesforce_sfdx_scanner_aura/Dockerfile +++ b/linters/salesforce_sfdx_scanner_aura/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/salesforce_sfdx_scanner_lwc/Dockerfile b/linters/salesforce_sfdx_scanner_lwc/Dockerfile index 20aab7283a5..9b2805e59a0 100644 --- a/linters/salesforce_sfdx_scanner_lwc/Dockerfile +++ b/linters/salesforce_sfdx_scanner_lwc/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/scala_scalafix/Dockerfile b/linters/scala_scalafix/Dockerfile index 08646defafe..3bef468b3d0 100644 --- a/linters/scala_scalafix/Dockerfile +++ b/linters/scala_scalafix/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/snakemake_lint/Dockerfile b/linters/snakemake_lint/Dockerfile index 44d30d27641..f00851ca243 100644 --- a/linters/snakemake_lint/Dockerfile +++ b/linters/snakemake_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/snakemake_snakefmt/Dockerfile b/linters/snakemake_snakefmt/Dockerfile index 3a3576a00c2..347ab6d018b 100644 --- a/linters/snakemake_snakefmt/Dockerfile +++ b/linters/snakemake_snakefmt/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/spell_cspell/Dockerfile b/linters/spell_cspell/Dockerfile index 3b0e5095ebf..7e45baeeb63 100644 --- a/linters/spell_cspell/Dockerfile +++ b/linters/spell_cspell/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/spell_misspell/Dockerfile b/linters/spell_misspell/Dockerfile index 495b16be067..8ec5c664fb5 100644 --- a/linters/spell_misspell/Dockerfile +++ b/linters/spell_misspell/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/spell_proselint/Dockerfile b/linters/spell_proselint/Dockerfile index 89a815e035b..9d3da7c7d4b 100644 --- a/linters/spell_proselint/Dockerfile +++ b/linters/spell_proselint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/sql_sql_lint/Dockerfile b/linters/sql_sql_lint/Dockerfile index ccf760202f3..c9d91cdee1a 100644 --- a/linters/sql_sql_lint/Dockerfile +++ b/linters/sql_sql_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/sql_sqlfluff/Dockerfile b/linters/sql_sqlfluff/Dockerfile index 27c551398cd..78d15c5f939 100644 --- a/linters/sql_sqlfluff/Dockerfile +++ b/linters/sql_sqlfluff/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 7e26f110858..bdb494fd0fe 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/swift_swiftlint/Dockerfile b/linters/swift_swiftlint/Dockerfile index 7379fe416da..34795731aa5 100644 --- a/linters/swift_swiftlint/Dockerfile +++ b/linters/swift_swiftlint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/tekton_tekton_lint/Dockerfile b/linters/tekton_tekton_lint/Dockerfile index 543849650ab..f0a1fc24075 100644 --- a/linters/tekton_tekton_lint/Dockerfile +++ b/linters/tekton_tekton_lint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/terraform_kics/Dockerfile b/linters/terraform_kics/Dockerfile index 6870c31f55b..91eb32c663b 100644 --- a/linters/terraform_kics/Dockerfile +++ b/linters/terraform_kics/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=kics /app/bin/kics /usr/bin/ +COPY --link --from=kics /app/bin/kics /usr/bin/ COPY --from=kics /app/bin/assets /opt/kics/assets/ #COPY__END @@ -123,7 +124,7 @@ COPY --from=kics /app/bin/assets /opt/kics/assets/ ############################################################################################# #OTHER__START # kics installation -# Managed with COPY --from=kics /app/bin/kics /usr/bin/ +# Managed with COPY --link --from=kics /app/bin/kics /usr/bin/ RUN mkdir -p /opt/kics/assets ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries # Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/ diff --git a/linters/terraform_terraform_fmt/Dockerfile b/linters/terraform_terraform_fmt/Dockerfile index af131523b29..b411240261f 100644 --- a/linters/terraform_terraform_fmt/Dockerfile +++ b/linters/terraform_terraform_fmt/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=terragrunt /bin/terraform /usr/bin/ +COPY --link --from=terragrunt /bin/terraform /usr/bin/ #COPY__END ############################################################################################# @@ -122,7 +123,7 @@ COPY --from=terragrunt /bin/terraform /usr/bin/ ############################################################################################# #OTHER__START # terraform-fmt installation -# Managed with COPY --from=terragrunt /bin/terraform /usr/bin/ +# Managed with COPY --link --from=terragrunt /bin/terraform /usr/bin/ #OTHER__END diff --git a/linters/terraform_terragrunt/Dockerfile b/linters/terraform_terragrunt/Dockerfile index 03ca23eb79f..b8bd75873ee 100644 --- a/linters/terraform_terragrunt/Dockerfile +++ b/linters/terraform_terragrunt/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## @@ -114,7 +115,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START -COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ #COPY__END ############################################################################################# @@ -122,7 +123,7 @@ COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ ############################################################################################# #OTHER__START # terragrunt installation -# Managed with COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ +# Managed with COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ #OTHER__END diff --git a/linters/typescript_prettier/Dockerfile b/linters/typescript_prettier/Dockerfile index 0a430d0cc38..4bbb2e866b6 100644 --- a/linters/typescript_prettier/Dockerfile +++ b/linters/typescript_prettier/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/typescript_standard/Dockerfile b/linters/typescript_standard/Dockerfile index c759177903c..60a893ffeaa 100644 --- a/linters/typescript_standard/Dockerfile +++ b/linters/typescript_standard/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index 38a36de80ff..ba218d4633a 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/xml_xmllint/Dockerfile b/linters/xml_xmllint/Dockerfile index 4e06dad8435..bc45cb6d7a9 100644 --- a/linters/xml_xmllint/Dockerfile +++ b/linters/xml_xmllint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/yaml_prettier/Dockerfile b/linters/yaml_prettier/Dockerfile index 0af5d325cc0..219c643d1e5 100644 --- a/linters/yaml_prettier/Dockerfile +++ b/linters/yaml_prettier/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/yaml_v8r/Dockerfile b/linters/yaml_v8r/Dockerfile index c3d8f994b1f..8afd83cf6fb 100644 --- a/linters/yaml_v8r/Dockerfile +++ b/linters/yaml_v8r/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## diff --git a/linters/yaml_yamllint/Dockerfile b/linters/yaml_yamllint/Dockerfile index fd3fcdf8852..5d6ef5787c6 100644 --- a/linters/yaml_yamllint/Dockerfile +++ b/linters/yaml_yamllint/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 ########################################### ########################################### ## Dockerfile to run MegaLinter ## From 62036cd4a313a720f66de49b38357485f7287c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 19 Feb 2023 00:10:11 +0000 Subject: [PATCH 15/18] Include apk go requirement for golangci-lint --- Dockerfile | 1 + flavors/cupcake/Dockerfile | 1 + flavors/go/Dockerfile | 1 + linters/go_golangci_lint/Dockerfile | 1 + megalinter/descriptors/go.megalinter-descriptor.yml | 2 ++ 5 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8c8254e1aa7..c1938c9517f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -112,6 +112,7 @@ RUN apk add --update --no-cache \ nodejs \ npm \ yarn \ + go \ openssl \ readline-dev \ g++ \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 3a346346727..90452d8bc62 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -87,6 +87,7 @@ RUN apk add --update --no-cache \ nodejs \ npm \ yarn \ + go \ libc-dev \ libxml2-dev \ libxml2-utils \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 968411b56aa..96cd82dea50 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -70,6 +70,7 @@ RUN apk add --update --no-cache \ nodejs \ npm \ yarn \ + go \ libc-dev \ libxml2-dev \ libxml2-utils \ diff --git a/linters/go_golangci_lint/Dockerfile b/linters/go_golangci_lint/Dockerfile index b63629f6bd0..a68b9a74455 100644 --- a/linters/go_golangci_lint/Dockerfile +++ b/linters/go_golangci_lint/Dockerfile @@ -48,6 +48,7 @@ RUN apk add --update --no-cache \ make \ musl-dev \ openssh \ + go \ && git config --global core.autocrlf true #APK__END diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index cc227ef3d36..8d8f934efe3 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -25,6 +25,8 @@ linters: - "golangci-lint run myfile.go" - "golangci-lint run -c .golangci.yml myfile.go" install: + apk: + - go dockerfile: - | RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \ From 4300a91d844dc914289517bd3993ed94a3d46a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 19 Feb 2023 00:55:45 +0000 Subject: [PATCH 16/18] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 966506540e2..76caa1ee283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - CI - Use docker/build-push-action to build docker images and akhilerm/tag-push-action to release by retagging and pushing beta images instead of rebuilding them - Authenticate to GitHub API during docker build to avoid reaching limits + - Remove apk go package install in images where possible to decrease image sizes, by @echoix in - Fixes - Replace deprecated spectral package, by @bdovaz in by @bdovaz in From 4a86e9263ea12c49851f0f8adc4e2524381a39d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 19 Feb 2023 15:04:25 +0000 Subject: [PATCH 17/18] Handle duplicated FROM and COPY instructions --- .automation/build.py | 17 +++++++++++++++-- Dockerfile | 18 +++++++++++------- flavors/cupcake/Dockerfile | 18 +++++++++++------- flavors/documentation/Dockerfile | 16 +++++++++------- flavors/dotnet/Dockerfile | 16 +++++++++------- flavors/go/Dockerfile | 16 +++++++++------- flavors/java/Dockerfile | 16 +++++++++------- flavors/javascript/Dockerfile | 16 +++++++++------- flavors/php/Dockerfile | 16 +++++++++------- flavors/python/Dockerfile | 16 +++++++++------- flavors/ruby/Dockerfile | 16 +++++++++------- flavors/rust/Dockerfile | 16 +++++++++------- flavors/salesforce/Dockerfile | 16 +++++++++------- flavors/swift/Dockerfile | 16 +++++++++------- flavors/terraform/Dockerfile | 18 +++++++++++------- linters/action_actionlint/Dockerfile | 11 +++++------ .../action.megalinter-descriptor.yml | 6 +++--- 17 files changed, 155 insertions(+), 109 deletions(-) diff --git a/.automation/build.py b/.automation/build.py index bf8f2a0cf68..ace1e4d50c2 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -216,7 +216,7 @@ def generate_flavor(flavor, flavor_info): with open(dockerfile, "r+", encoding="utf-8") as f: first_line = f.readline().rstrip() if first_line.startswith("# syntax="): - comment = f"{first_line}\n{comment}" + comment = f"{first_line}\n{comment}" else: f.seek(0) content = f.read() @@ -305,14 +305,27 @@ def build_dockerfile( for dockerfile_item in item["install"]["dockerfile"]: # FROM if dockerfile_item.startswith("FROM"): + if dockerfile_item in all_dockerfile_items: + dockerfile_item = ( + "# Next FROM line commented because already managed by another linter\n" + "# " + "\n# ".join(dockerfile_item.splitlines()) + ) docker_from += [dockerfile_item] # ARG elif dockerfile_item.startswith("ARG"): docker_arg += [dockerfile_item] # COPY elif dockerfile_item.startswith("COPY"): + if dockerfile_item in all_dockerfile_items: + dockerfile_item = ( + "# Next COPY line commented because already managed by another linter\n" + "# " + "\n# ".join(dockerfile_item.splitlines()) + ) docker_copy += [dockerfile_item] - docker_other += ["# Managed with " + dockerfile_item] + docker_other += [ + "# Managed with " + + "\n# ".join(dockerfile_item.splitlines()) + ] # Already used item elif ( dockerfile_item in all_dockerfile_items diff --git a/Dockerfile b/Dockerfile index c1938c9517f..6549a76f4d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -35,6 +36,8 @@ FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan FROM alpine/terragrunt:latest as terragrunt +# Next FROM line commented because already managed by another linter +# FROM alpine/terragrunt:latest as terragrunt FROM checkmarx/kics:alpine as kics #FROM__END @@ -299,9 +302,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -406,9 +410,8 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk-master/arm-ttk/arm-ttk.psd1" @@ -423,7 +426,8 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 90452d8bc62..361dc6b459a 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -31,6 +32,8 @@ FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan FROM alpine/terragrunt:latest as terragrunt +# Next FROM line commented because already managed by another linter +# FROM alpine/terragrunt:latest as terragrunt FROM checkmarx/kics:alpine as kics #FROM__END @@ -258,9 +261,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -304,16 +308,16 @@ ENV PATH="/root/.composer/vendor/bin:$PATH" # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index a470f314493..69fb727d644 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -200,9 +201,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -217,16 +219,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 08dc1e9bfde..afaa4310f13 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -220,9 +221,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -281,9 +283,8 @@ RUN --mount=type=secret,id=GITHUB_TOKEN mkdir -p ${PWSH_DIRECTORY} \ # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk-master/arm-ttk/arm-ttk.psd1" @@ -298,7 +299,8 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \ && chmod +x /usr/bin/bash-exec \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 96cd82dea50..dc228ac7474 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -207,9 +208,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -225,16 +227,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index dbc7722afb2..ac0eba86ff7 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -200,9 +201,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -221,16 +223,16 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index 499afa1ea88..7cd8b44d831 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -221,9 +222,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -237,16 +239,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index 0e7f97cb109..b81b1fefe43 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -211,9 +212,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -245,16 +247,16 @@ ENV PATH="/root/.composer/vendor/bin:$PATH" # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 0e59a061e88..c81701b37c1 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -210,9 +211,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -227,16 +229,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index c64c4830953..46de9c823e7 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -205,9 +206,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -221,16 +223,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index ec412e41c8a..f1dd4eb4cc6 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -199,9 +200,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -215,16 +217,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 94ba1b71a19..a8e84b5df31 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -202,9 +203,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -225,16 +227,16 @@ RUN echo y|sfdx plugins:install sfdx-hardis \ # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 1577e094dae..afcc8886f04 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -201,9 +202,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -218,16 +220,16 @@ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ RUN rc-update add docker boot && rc-service docker start || true \ # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 03446388721..5cdc7ffca7e 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -13,10 +13,11 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint FROM koalaman/shellcheck:stable as shellcheck +# Next FROM line commented because already managed by another linter +# FROM koalaman/shellcheck:stable as shellcheck FROM mvdan/shfmt:latest-alpine as shfmt FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:2.7.0 as editorconfig-checker @@ -25,6 +26,8 @@ FROM zricethezav/gitleaks:v8.15.3 as gitleaks FROM ghcr.io/terraform-linters/tflint:v0.45.0 as tflint FROM tenable/terrascan:1.18.0 as terrascan FROM alpine/terragrunt:latest as terragrunt +# Next FROM line commented because already managed by another linter +# FROM alpine/terragrunt:latest as terragrunt FROM checkmarx/kics:alpine as kics #FROM__END @@ -203,9 +206,10 @@ ENV PATH="/root/.cargo/bin:${PATH}" #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Next COPY line commented because already managed by another linter +# COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck 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 @@ -225,16 +229,16 @@ COPY --from=kics /app/bin/assets /opt/kics/assets/ #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # 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 \ # shellcheck installation -# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # shfmt installation # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ diff --git a/linters/action_actionlint/Dockerfile b/linters/action_actionlint/Dockerfile index bdd53820fa4..dd3fbe89b1e 100644 --- a/linters/action_actionlint/Dockerfile +++ b/linters/action_actionlint/Dockerfile @@ -12,9 +12,9 @@ ############################################################################################# #FROM__START FROM rhysd/actionlint:latest as actionlint -# shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile -FROM koalaman/shellcheck:stable as shellcheck +# shellcheck is a dependency for actionlint +FROM koalaman/shellcheck:stable as shellcheck #FROM__END ################## @@ -121,8 +121,8 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ #COPY__START COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #COPY__END ############################################################################################# @@ -131,9 +131,8 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #OTHER__START # actionlint installation # Managed with COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint -# shellcheck is a dependency for actionlint -COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck - +# # shellcheck is a dependency for actionlint +# Managed with COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck #OTHER__END diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index d0514de92c1..4681db1e0ec 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -30,9 +30,9 @@ linters: dockerfile: - | FROM rhysd/actionlint:latest as actionlint - # shellcheck is a dependency for actionlint and the FROM command may be safely repeated in a Dockerfile - FROM koalaman/shellcheck:stable as shellcheck + # shellcheck is a dependency for actionlint + - FROM koalaman/shellcheck:stable as shellcheck - | COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck \ No newline at end of file From 2f130b08dec556aa4b65669c2c21f2885fcb7179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 19 Feb 2023 15:07:35 +0000 Subject: [PATCH 18/18] cSpell fixes --- .github/linters/.cspell.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/linters/.cspell.json b/.github/linters/.cspell.json index 0002581c1d5..a117e6c1c64 100644 --- a/.github/linters/.cspell.json +++ b/.github/linters/.cspell.json @@ -132,6 +132,7 @@ "Fmegalinter", "GHSA", "GITLEAKS", + "GOBIN", "GOLANGCI", "GOODCHECK", "GOPATH", @@ -539,6 +540,7 @@ "descriptionless", "devcontainer", "devcontainers", + "devel", "devskim", "dimen", "dimendef", @@ -864,6 +866,7 @@ "mlinters", "moarvm", "mprettier", + "mrtazz", "msgon", "mstruebing", "msvs", @@ -977,6 +980,7 @@ "packagename", "pagebreak", "pageref", + "pandoc", "parallelization", "paren", "parens",