Updated Kubeval version (#3206)

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* download binary vs install from container

* no need for sudo...

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
This commit is contained in:
maharshi 2022-08-15 21:53:32 +05:30 committed by GitHub
parent a487c7818d
commit e7738fabe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,6 @@ FROM tenable/terrascan:1.15.2 as terrascan
FROM assignuser/chktex-alpine:v0.1.1 as chktex FROM assignuser/chktex-alpine:v0.1.1 as chktex
FROM cljkondo/clj-kondo:2022.03.09-alpine as clj-kondo FROM cljkondo/clj-kondo:2022.03.09-alpine as clj-kondo
FROM dotenvlinter/dotenv-linter:3.2.0 as dotenv-linter FROM dotenvlinter/dotenv-linter:3.2.0 as dotenv-linter
FROM garethr/kubeval:0.15.0 as kubeval
FROM ghcr.io/awkbar-devops/clang-format:v1.0.2 as clang-format FROM ghcr.io/awkbar-devops/clang-format:v1.0.2 as clang-format
FROM ghcr.io/terraform-linters/tflint-bundle:v0.39.1.1 as tflint FROM ghcr.io/terraform-linters/tflint-bundle:v0.39.1.1 as tflint
FROM golangci/golangci-lint:v1.47.3 as golangci-lint FROM golangci/golangci-lint:v1.47.3 as golangci-lint
@ -47,6 +46,8 @@ ARG GLIBC_VERSION='2.31-r0'
ARG PSSA_VERSION='latest' ARG PSSA_VERSION='latest'
ARG PWSH_DIRECTORY='/usr/lib/microsoft/powershell' ARG PWSH_DIRECTORY='/usr/lib/microsoft/powershell'
ARG PWSH_VERSION='latest' ARG PWSH_VERSION='latest'
# Kubeval Version
ARG KUBEVAL_VERSION='v0.16.1'
#################### ####################
# Run APK installs # # Run APK installs #
@ -173,11 +174,6 @@ COPY --from=dockerfile-lint /bin/hadolint /usr/bin/hadolint
################## ##################
COPY --from=chktex /usr/bin/chktex /usr/bin/ COPY --from=chktex /usr/bin/chktex /usr/bin/
###################
# Install kubeval #
###################
COPY --from=kubeval /kubeval /usr/bin/
################# #################
# Install shfmt # # Install shfmt #
################# #################
@ -211,10 +207,17 @@ RUN mkdir -p /home/r-library \
&& Rscript -e "install.packages(c('lintr','purrr'), repos = 'https://cloud.r-project.org/')" \ && Rscript -e "install.packages(c('lintr','purrr'), repos = 'https://cloud.r-project.org/')" \
&& R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos = NULL, type = 'source')" && R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos = NULL, type = 'source')"
###################
# Install Kubeval #
###################
RUN wget --tries=5 -q -O kubeval-linux-amd64.tar.gz https://github.com/instrumenta/kubeval/releases/download/${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz \
&& tar xf kubeval-linux-amd64.tar.gz \
&& mv kubeval /usr/local/bin \
&& rm kubeval-linux-amd64.tar.gz \
################## ##################
# Install ktlint # # Install ktlint #
################## ##################
RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint \ && curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint \
&& chmod a+x ktlint \ && chmod a+x ktlint \
&& mv "ktlint" /usr/bin/ \ && mv "ktlint" /usr/bin/ \
&& terrascan init \ && terrascan init \