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 #