Skip to content

Commit 9341eed

Browse files
committed
Sped up the build a bit
1 parent 891a99e commit 9341eed

File tree

21 files changed

+175
-180
lines changed

21 files changed

+175
-180
lines changed

Dockerfile

+20-27
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,21 @@ RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli
127127
#
128128
# bash-exec installation
129129
&& printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \
130-
&& chmod +x /usr/bin/bash-exec \
130+
&& chmod +x /usr/bin/bash-exec
131+
132+
#
133+
# pmd installation
134+
ARG PMD_VERSION=6.55.0
135+
RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
136+
unzip pmd-bin-${PMD_VERSION}.zip && \
137+
rm pmd-bin-${PMD_VERSION}.zip && \
138+
mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
139+
chmod +x /usr/bin/pmd/bin/run.sh \
140+
#
141+
# ktlint installation
142+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
143+
chmod a+x ktlint && \
144+
mv "ktlint" /usr/bin/ \
131145
#
132146
# scalafix installation
133147
&& ./coursier install scalafix --quiet --install-dir /usr/bin && rm -rf /root/.cache
@@ -242,6 +256,8 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
242256
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
243257
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
244258
COPY --link --from=revive /usr/bin/revive /usr/bin/revive
259+
COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd
260+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
245261
COPY --link --from=kubeconform /kubeconform /usr/bin/
246262
COPY --link --from=chktex /usr/bin/chktex /usr/bin/
247263
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
@@ -507,7 +523,6 @@ ARG ARM_TTK_DIRECTORY='/opt/microsoft'
507523
ARG BICEP_EXE='bicep'
508524
ARG BICEP_DIR='/usr/local/bin'
509525
ARG DART_VERSION='2.8.4'
510-
ARG PMD_VERSION=6.55.0
511526
ARG PSSA_VERSION='latest'
512527
#ARG__END
513528

@@ -566,6 +581,8 @@ RUN apk add --no-cache \
566581
libc6-compat \
567582
openssl \
568583
readline-dev \
584+
lua \
585+
luarocks \
569586
g++ \
570587
libc-dev \
571588
libgcc \
@@ -877,39 +894,15 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \
877894
--output /usr/bin/checkstyle
878895

879896
#
880-
# pmd installation
881-
RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
882-
unzip pmd-bin-${PMD_VERSION}.zip && \
883-
rm pmd-bin-${PMD_VERSION}.zip && \
884-
mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
885-
chmod +x /usr/bin/pmd/bin/run.sh \
886-
#
887-
# ktlint installation
888-
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
889-
chmod a+x ktlint && \
890-
mv "ktlint" /usr/bin/ \
891-
#
892897
# kubescape installation
893-
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
898+
RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
894899
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \
895900
#
896901
# chktex installation
897902
&& cd ~ && touch .chktexrc && cd / \
898903
#
899904
# luacheck installation
900-
&& wget --tries=5 https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - \
901-
&& cd lua-5.3.5 \
902-
&& make linux \
903-
&& make install \
904-
&& cd .. && rm -r lua-5.3.5/ \
905-
&& wget --tries=5 https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O - -q | tar -xzf - \
906-
&& cd luarocks-3.3.1-super-linter \
907-
&& ./configure --with-lua-include=/usr/local/include \
908-
&& make \
909-
&& make -b install \
910-
&& cd .. && rm -r luarocks-3.3.1-super-linter/ \
911905
&& luarocks install luacheck \
912-
&& cd / \
913906
#
914907
# perlcritic installation
915908
&& curl --retry 5 --retry-delay 5 -sL https://cpanmin.us/ | perl - -nq --no-wget Perl::Critic

flavors/cupcake/Dockerfile

+18-14
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,20 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
110110
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 \
111111
&& chmod +x /usr/bin/bash-exec
112112

113+
#
114+
# pmd installation
115+
ARG PMD_VERSION=6.55.0
116+
RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
117+
unzip pmd-bin-${PMD_VERSION}.zip && \
118+
rm pmd-bin-${PMD_VERSION}.zip && \
119+
mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
120+
chmod +x /usr/bin/pmd/bin/run.sh \
121+
#
122+
# ktlint installation
123+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
124+
chmod a+x ktlint && \
125+
mv "ktlint" /usr/bin/
126+
113127
#
114128
#BUILD_PLATFORM_OTHER__END
115129

@@ -216,6 +230,8 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
216230
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
217231
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
218232
COPY --link --from=revive /usr/bin/revive /usr/bin/revive
233+
COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd
234+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
219235
COPY --link --from=kubeconform /kubeconform /usr/bin/
220236
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
221237
COPY --link --chmod=755 --from=phpstan /composer/vendor/phpstan/phpstan/phpstan.phar /usr/bin/phpstan
@@ -444,7 +460,7 @@ RUN apk add --update --no-cache libc6-compat \
444460
## @generated by .automation/build.py using descriptor files, please do not update manually ##
445461
#############################################################################################
446462
#ARG__START
447-
ARG PMD_VERSION=6.55.0
463+
448464
#ARG__END
449465

450466
####################
@@ -661,20 +677,8 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \
661677
--output /usr/bin/checkstyle
662678

663679
#
664-
# pmd installation
665-
RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
666-
unzip pmd-bin-${PMD_VERSION}.zip && \
667-
rm pmd-bin-${PMD_VERSION}.zip && \
668-
mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
669-
chmod +x /usr/bin/pmd/bin/run.sh \
670-
#
671-
# ktlint installation
672-
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
673-
chmod a+x ktlint && \
674-
mv "ktlint" /usr/bin/ \
675-
#
676680
# kubescape installation
677-
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
681+
RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
678682
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6
679683

680684
#

flavors/documentation/Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
4343
#BUILD_PLATFORM_OTHER__START
4444
# bash-exec installation
4545
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 \
46-
&& chmod +x /usr/bin/bash-exec
46+
&& chmod +x /usr/bin/bash-exec \
47+
#
48+
# ktlint installation
49+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
50+
chmod a+x ktlint && \
51+
mv "ktlint" /usr/bin/
4752

4853
#
4954
#BUILD_PLATFORM_OTHER__END
@@ -131,6 +136,7 @@ COPY --link --from=node_modules /node-deps /node-deps
131136
COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
132137
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
133138
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
139+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
134140
COPY --link --from=kubeconform /kubeconform /usr/bin/
135141
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
136142
COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/
@@ -388,13 +394,8 @@ COPY --from=copy-collector / /
388394
## @generated by .automation/build.py using descriptor files, please do not update manually ##
389395
#############################################################################################
390396
#OTHER__START
391-
# ktlint installation
392-
RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
393-
chmod a+x ktlint && \
394-
mv "ktlint" /usr/bin/ \
395-
#
396397
# kubescape installation
397-
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
398+
RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
398399
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \
399400
#
400401
# grype installation

flavors/dotnet/Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
4343
#BUILD_PLATFORM_OTHER__START
4444
# bash-exec installation
4545
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 \
46-
&& chmod +x /usr/bin/bash-exec
46+
&& chmod +x /usr/bin/bash-exec \
47+
#
48+
# ktlint installation
49+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
50+
chmod a+x ktlint && \
51+
mv "ktlint" /usr/bin/
4752

4853
#
4954
#BUILD_PLATFORM_OTHER__END
@@ -134,6 +139,7 @@ COPY --link --from=node_modules /node-deps /node-deps
134139
COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
135140
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
136141
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
142+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
137143
COPY --link --from=kubeconform /kubeconform /usr/bin/
138144
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
139145
COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/
@@ -485,11 +491,6 @@ esac \
485491
# csharpier installation
486492
&& /usr/share/dotnet/dotnet tool install -g csharpier \
487493
#
488-
# ktlint installation
489-
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
490-
chmod a+x ktlint && \
491-
mv "ktlint" /usr/bin/ \
492-
#
493494
# kubescape installation
494495
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
495496
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \

flavors/dotnetweb/Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
4343
#BUILD_PLATFORM_OTHER__START
4444
# bash-exec installation
4545
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 \
46-
&& chmod +x /usr/bin/bash-exec
46+
&& chmod +x /usr/bin/bash-exec \
47+
#
48+
# ktlint installation
49+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
50+
chmod a+x ktlint && \
51+
mv "ktlint" /usr/bin/
4752

4853
#
4954
#BUILD_PLATFORM_OTHER__END
@@ -154,6 +159,7 @@ COPY --link --from=shfmt /bin/shfmt /usr/bin/
154159
COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
155160
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
156161
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
162+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
157163
COPY --link --from=kubeconform /kubeconform /usr/bin/
158164
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
159165
COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/
@@ -505,11 +511,6 @@ esac \
505511
# csharpier installation
506512
&& /usr/share/dotnet/dotnet tool install -g csharpier \
507513
#
508-
# ktlint installation
509-
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
510-
chmod a+x ktlint && \
511-
mv "ktlint" /usr/bin/ \
512-
#
513514
# kubescape installation
514515
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
515516
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \

flavors/go/Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
5757
#BUILD_PLATFORM_OTHER__START
5858
# bash-exec installation
5959
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 \
60-
&& chmod +x /usr/bin/bash-exec
60+
&& chmod +x /usr/bin/bash-exec \
61+
#
62+
# ktlint installation
63+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
64+
chmod a+x ktlint && \
65+
mv "ktlint" /usr/bin/
6166

6267
#
6368
#BUILD_PLATFORM_OTHER__END
@@ -146,6 +151,7 @@ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
146151
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
147152
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
148153
COPY --link --from=revive /usr/bin/revive /usr/bin/revive
154+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
149155
COPY --link --from=kubeconform /kubeconform /usr/bin/
150156
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
151157
COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/
@@ -408,11 +414,6 @@ COPY --from=copy-collector / /
408414
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
409415
&& golangci-lint --version \
410416
#
411-
# ktlint installation
412-
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
413-
chmod a+x ktlint && \
414-
mv "ktlint" /usr/bin/ \
415-
#
416417
# kubescape installation
417418
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
418419
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \

flavors/java/Dockerfile

+18-14
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
4545
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 \
4646
&& chmod +x /usr/bin/bash-exec
4747

48+
#
49+
# pmd installation
50+
ARG PMD_VERSION=6.55.0
51+
RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
52+
unzip pmd-bin-${PMD_VERSION}.zip && \
53+
rm pmd-bin-${PMD_VERSION}.zip && \
54+
mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
55+
chmod +x /usr/bin/pmd/bin/run.sh \
56+
#
57+
# ktlint installation
58+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
59+
chmod a+x ktlint && \
60+
mv "ktlint" /usr/bin/
61+
4862
#
4963
#BUILD_PLATFORM_OTHER__END
5064

@@ -131,6 +145,8 @@ COPY --link --from=node_modules /node-deps /node-deps
131145
COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
132146
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
133147
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
148+
COPY --link --from=build-platform /usr/bin/pmd /usr/bin/pmd
149+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
134150
COPY --link --from=kubeconform /kubeconform /usr/bin/
135151
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
136152
COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/
@@ -287,7 +303,7 @@ RUN apk add --update --no-cache libc6-compat \
287303
## @generated by .automation/build.py using descriptor files, please do not update manually ##
288304
#############################################################################################
289305
#ARG__START
290-
ARG PMD_VERSION=6.55.0
306+
291307
#ARG__END
292308

293309
####################
@@ -458,20 +474,8 @@ RUN --mount=type=secret,id=GITHUB_TOKEN CHECKSTYLE_LATEST=$(curl -s \
458474
--output /usr/bin/checkstyle
459475

460476
#
461-
# pmd installation
462-
RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${PMD_VERSION}/pmd-bin-${PMD_VERSION}.zip && \
463-
unzip pmd-bin-${PMD_VERSION}.zip && \
464-
rm pmd-bin-${PMD_VERSION}.zip && \
465-
mv pmd-bin-${PMD_VERSION} /usr/bin/pmd && \
466-
chmod +x /usr/bin/pmd/bin/run.sh \
467-
#
468-
# ktlint installation
469-
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
470-
chmod a+x ktlint && \
471-
mv "ktlint" /usr/bin/ \
472-
#
473477
# kubescape installation
474-
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
478+
RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
475479
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \
476480
#
477481
# grype installation

flavors/javascript/Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ FROM --platform=$BUILDPLATFORM python:3.11.3-alpine3.17 AS build-platform
4242
#BUILD_PLATFORM_OTHER__START
4343
# bash-exec installation
4444
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 \
45-
&& chmod +x /usr/bin/bash-exec
45+
&& chmod +x /usr/bin/bash-exec \
46+
#
47+
# ktlint installation
48+
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
49+
chmod a+x ktlint && \
50+
mv "ktlint" /usr/bin/
4651

4752
#
4853
#BUILD_PLATFORM_OTHER__END
@@ -152,6 +157,7 @@ COPY --link --from=shfmt /bin/shfmt /usr/bin/
152157
COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint
153158
COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
154159
COPY --link --from=dotenvlinter /dotenv-linter /usr/bin/dotenv-linter
160+
COPY --link --from=build-platform /usr/bin/ktlint /usr/bin/ktlint
155161
COPY --link --from=kubeconform /kubeconform /usr/bin/
156162
COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/
157163
COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/
@@ -408,13 +414,8 @@ COPY --from=copy-collector / /
408414
## @generated by .automation/build.py using descriptor files, please do not update manually ##
409415
#############################################################################################
410416
#OTHER__START
411-
# ktlint installation
412-
RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint && \
413-
chmod a+x ktlint && \
414-
mv "ktlint" /usr/bin/ \
415-
#
416417
# kubescape installation
417-
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
418+
RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
418419
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.3.6 \
419420
#
420421
# grype installation

0 commit comments

Comments
 (0)