mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 02:01:02 -05:00
build: install chktex (#5074)
Install chktex directly instead of using a third-party container image.
This commit is contained in:
parent
1ca3ebccd6
commit
690d422fd6
2 changed files with 31 additions and 6 deletions
14
Dockerfile
14
Dockerfile
|
@ -9,7 +9,6 @@
|
||||||
#########################################
|
#########################################
|
||||||
FROM tenable/terrascan:1.18.11 as terrascan
|
FROM tenable/terrascan:1.18.11 as terrascan
|
||||||
FROM alpine/terragrunt:1.6.6 as terragrunt
|
FROM alpine/terragrunt:1.6.6 as terragrunt
|
||||||
FROM ghcr.io/assignuser/chktex-alpine:v0.2.0 as chktex
|
|
||||||
FROM dotenvlinter/dotenv-linter:3.3.0 as dotenv-linter
|
FROM dotenvlinter/dotenv-linter:3.3.0 as dotenv-linter
|
||||||
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:v0.50.0 as tflint
|
FROM ghcr.io/terraform-linters/tflint:v0.50.0 as tflint
|
||||||
|
@ -129,6 +128,14 @@ RUN apk add --no-cache --virtual .perl-build-deps \
|
||||||
Perl::Critic::Tics \
|
Perl::Critic::Tics \
|
||||||
&& apk del --no-network --purge .perl-build-deps
|
&& apk del --no-network --purge .perl-build-deps
|
||||||
|
|
||||||
|
##################
|
||||||
|
# Install chktex #
|
||||||
|
##################
|
||||||
|
COPY scripts/install-chktex.sh /
|
||||||
|
RUN --mount=type=secret,id=GITHUB_TOKEN /install-chktex.sh && rm -rf /install-chktex.sh
|
||||||
|
# Set work directory back to root because some scripts depend on it
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# Install shellcheck #
|
# Install shellcheck #
|
||||||
######################
|
######################
|
||||||
|
@ -179,11 +186,6 @@ COPY --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker
|
||||||
###############################
|
###############################
|
||||||
COPY --from=dockerfile-lint /bin/hadolint /usr/bin/hadolint
|
COPY --from=dockerfile-lint /bin/hadolint /usr/bin/hadolint
|
||||||
|
|
||||||
##################
|
|
||||||
# Install chktex #
|
|
||||||
##################
|
|
||||||
COPY --from=chktex /usr/bin/chktex /usr/bin/
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# Install shfmt #
|
# Install shfmt #
|
||||||
#################
|
#################
|
||||||
|
|
23
scripts/install-chktex.sh
Executable file
23
scripts/install-chktex.sh
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
apk add --no-cache --virtual .chktex-build-deps \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
libc-dev \
|
||||||
|
libtool \
|
||||||
|
make
|
||||||
|
|
||||||
|
git clone https://git.savannah.gnu.org/git/chktex.git &&
|
||||||
|
cd chktex/chktex &&
|
||||||
|
./autogen.sh --prefix=/usr/bin &&
|
||||||
|
./configure &&
|
||||||
|
make &&
|
||||||
|
install chktex /usr/bin
|
||||||
|
|
||||||
|
rm -rfv /chktex
|
||||||
|
|
||||||
|
apk del --no-network --purge .chktex-build-deps
|
Loading…
Reference in a new issue