From 70bf36d8f8df143bacf8f796d5480a9246c28949 Mon Sep 17 00:00:00 2001 From: John Wiebalk Date: Fri, 31 Jan 2020 17:24:33 -0500 Subject: [PATCH] switch to repo clone vs npm --- Dockerfile | 9 +++++++-- lib/linter.sh | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8df5f251..3f089d5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,8 +57,13 @@ RUN npm -g --no-cache install \ prettier \ eslint-config-prettier \ @typescript-eslint/eslint-plugin \ - @typescript-eslint/parser \ - dockerfilelint + @typescript-eslint/parser + +#################################### +# Install dockerfilelint from repo # +#################################### + +RUN git clone https://github.com/replicatedhq/dockerfilelint.git && cd /dockerfilelint && npm install # I think we could fix this with path but not sure the language... # https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md diff --git a/lib/linter.sh b/lib/linter.sh index 751a3401..c687eeaa 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -39,7 +39,7 @@ DOCKER_LINTER_RULES="$DEFAULT_RULES_LOCATION/$DOCKER_FILE_NAME" # Path to th # Linter array for information prints # ####################################### LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck" - "pylint" "perl" "rubocop" "coffeelint" "eslint" "standard" "ansible-lint" "node_modules/dockerfilelint/bin/dockerfilelint") + "pylint" "perl" "rubocop" "coffeelint" "eslint" "standard" "ansible-lint" "/dockerfilelint/bin/dockerfilelint") ################### # GitHub ENV Vars # @@ -1947,7 +1947,7 @@ LintDockerFiles() # Name of the linter # ###################### LINTER_NAME="dockerfilelint" - LINTER_PATH="/node_modules/dockerfilelint/bin/dockerfilelint" + LINTER_PATH="/dockerfilelint/bin/dockerfilelint" ######################################### # Validate we have shellcheck installed #