Uninstall Dockerfilelint (#2195)

* Uninstall Dockerfilelint

* remove dockerfilelint packages

* trying ca-certs

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
This commit is contained in:
Marco Ferrari 2021-12-08 16:53:05 +01:00 committed by GitHub
parent 6d947faec3
commit ee99da290b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 10768 additions and 391 deletions

View file

@ -52,6 +52,7 @@ ARG GLIBC_VERSION='2.31-r0'
#################### ####################
RUN apk add --no-cache \ RUN apk add --no-cache \
bash \ bash \
ca-certificates \
coreutils \ coreutils \
curl \ curl \
file \ file \

View file

@ -51,6 +51,7 @@ ARG GLIBC_VERSION='2.31-r0'
#################### ####################
RUN apk add --no-cache \ RUN apk add --no-cache \
bash \ bash \
ca-certificates \
cargo \ cargo \
coreutils \ coreutils \
curl \ curl \

View file

@ -63,7 +63,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their codebase w
| **CoffeeScript** | [coffeelint](https://coffeelint.github.io/) | | **CoffeeScript** | [coffeelint](https://coffeelint.github.io/) |
| **Copy/paste detection** | [jscpd](https://github.com/kucherenko/jscpd) | | **Copy/paste detection** | [jscpd](https://github.com/kucherenko/jscpd) |
| **Dart** | [dartanalyzer](https://dart.dev/guides/language/analysis-options) | | **Dart** | [dartanalyzer](https://dart.dev/guides/language/analysis-options) |
| **Dockerfile** | [dockerfilelint](https://github.com/replicatedhq/dockerfilelint.git) / [hadolint](https://github.com/hadolint/hadolint) | | **Dockerfile** | [hadolint](https://github.com/hadolint/hadolint) |
| **EditorConfig** | [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) | | **EditorConfig** | [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) |
| **ENV** | [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) | | **ENV** | [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) |
| **GitHub Actions** | [actionlint](https://github.com/rhysd/actionlint) | | **GitHub Actions** | [actionlint](https://github.com/rhysd/actionlint) |
@ -211,6 +211,7 @@ The **GitHub Super-Linter** now builds and supports `multiple` images. We have f
After further investigation, we were able to see that a few linters were very disk heavy. We removed those linters and created the `slim` image. After further investigation, we were able to see that a few linters were very disk heavy. We removed those linters and created the `slim` image.
This allows users to choose which **Super-Linter** they want to run and potentially speed up their build time. This allows users to choose which **Super-Linter** they want to run and potentially speed up their build time.
The available images: The available images:
- `github/super-linter:v4` - `github/super-linter:v4`
- `github/super-linter:slim-v4` - `github/super-linter:slim-v4`
@ -334,7 +335,6 @@ But if you wish to select or exclude specific linters, we give you full control
| **VALIDATE_CSHARP** | `true` | Flag to enable or disable the linting process of the C# language. | | **VALIDATE_CSHARP** | `true` | Flag to enable or disable the linting process of the C# language. |
| **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the CSS language. | | **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the CSS language. |
| **VALIDATE_DART** | `true` | Flag to enable or disable the linting process of the Dart language. | | **VALIDATE_DART** | `true` | Flag to enable or disable the linting process of the Dart language. |
| **VALIDATE_DOCKERFILE** | `true` | Flag to enable or disable the linting process of the Docker language. |
| **VALIDATE_DOCKERFILE_HADOLINT** | `true` | Flag to enable or disable the linting process of the Docker language. | | **VALIDATE_DOCKERFILE_HADOLINT** | `true` | Flag to enable or disable the linting process of the Docker language. |
| **VALIDATE_EDITORCONFIG** | `true` | Flag to enable or disable the linting process with the EditorConfig. | | **VALIDATE_EDITORCONFIG** | `true` | Flag to enable or disable the linting process with the EditorConfig. |
| **VALIDATE_ENV** | `true` | Flag to enable or disable the linting process of the ENV language. | | **VALIDATE_ENV** | `true` | Flag to enable or disable the linting process of the ENV language. |

View file

@ -1,104 +0,0 @@
---
###########################
###########################
## Dockerfile Lint rules ##
###########################
###########################
#################################
# Default is 'on' for all rules #
# You can disable as needed. #
#################################
# Additional Info can be found at:
# https://github.com/replicatedhq/dockerfilelint
# Set the rules
rules:
# All commands in a Dockerfile require at least 1 argument
required_params: on
# For clarity and readability, all instructions in
# a Dockerfile should be uppercase
uppercase_commands: on
# The first instruction in a Dockerfile must specify
# the base image using a FROM
from_first: on
# This line is not a valid Dockerfile line
invalid_line: on
# Use of sudo is not allowed in a Dockerfile
sudo_usage: on
# Consider using a `--no-install-recommends` when `apt-get`
# installing packages
apt-get_missing_param: on
# Consider using a `--no-install-recommends` when `apt-get`
# installing packages
apt-get_recommends: on
# Use of `apt-get upgrade` is not allowed in a Dockerfile
apt-get-upgrade: on
# Use of `apt-get dist-upgrade` is not allowed in a Dockerfile
apt-get-dist-upgrade: on
# All instances of `apt-get update` should have the `apt-get install`
# commands on the same line to reduce image size
apt-get-update_require_install: on
# Consider using a `--no-cache` (supported in alpine linux >= 3.3) or
# `--update` followed by the command `rm -rf /var/cache/apk/*`
# when `apk` adding packages. This will result in a smaller image size
apkadd-missing_nocache_or_updaterm: on
# Consider using a `--virtual` or `-t` switch to group multiple packages
# for easy cleanup. This will help ensure future authors will continue
# to clean up build dependencies and other temporary packages
apkadd-missing-virtual: on
# Exposing ports should only be valid port numbers
invalid_port: on
# Only valid commands are allowed in a Dockerfile
invalid_command: on
# Expose Only Container Port
expose_host_port: on
# Using LABEL should be in key=value format
label_invalid: on
# Base images should specify a tag to use
missing_tag: on
# Base images should not use the latest tag
latest_tag: on
# This command has extra arguments and will be ignored
extra_args: on
# This command requires additional arguments
missing_args: on
# All files referenced in an ADD command should
# be part of the Docker build context
add_src_invalid: on
# When adding multiple files, the destination should be a directory
add_dest_invalid: on
# Using a WORKDIR parameter that has spaces should be escaped
invalid_workdir: on
# The arguments to this command are invalid
invalid_format: on
# Use of apt-get update should be paired with
# rm -rf /var/lib/apt/lists/* in the same layer
apt-get_missing_rm: on
# This INSTRUCTION is deprecated as of Docker 1.13
deprecated_in_1.13: on

11033
dependencies/package-lock.json generated vendored

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,6 @@
"asl-validator": "^1.10.0", "asl-validator": "^1.10.0",
"axios": "^0.24.0", "axios": "^0.24.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"dockerfilelint": "^1.8.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1", "eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
@ -21,8 +20,8 @@
"eslint-plugin-react-hooks": "^4.3.0", "eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-vue": "^8.2.0", "eslint-plugin-vue": "^8.2.0",
"gherkin-lint": "^4.2.2", "gherkin-lint": "^4.2.2",
"immer": "^9.0.7",
"htmlhint": "^1.0.0", "htmlhint": "^1.0.0",
"immer": "^9.0.7",
"ini": "^2.0.0", "ini": "^2.0.0",
"jscpd": "^3.4.2", "jscpd": "^3.4.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",

View file

@ -395,12 +395,11 @@ function BuildFileList() {
# Get the DOCKER files # # Get the DOCKER files #
######################## ########################
# Use BASE_FILE here because FILE_TYPE is not reliable when there is no file extension # Use BASE_FILE here because FILE_TYPE is not reliable when there is no file extension
elif [[ "${FILE_TYPE}" != "dockerfilelintrc" ]] && [[ "${FILE_TYPE}" != "tap" ]] && [[ "${FILE_TYPE}" != "yml" ]] && elif [[ "${FILE_TYPE}" != "tap" ]] && [[ "${FILE_TYPE}" != "yml" ]] &&
[[ "${FILE_TYPE}" != "yaml" ]] && [[ "${FILE_TYPE}" != "json" ]] && [[ "${FILE_TYPE}" != "xml" ]] && [[ "${BASE_FILE}" =~ .*(contain|dock)erfile.* ]]; then [[ "${FILE_TYPE}" != "yaml" ]] && [[ "${FILE_TYPE}" != "json" ]] && [[ "${FILE_TYPE}" != "xml" ]] && [[ "${BASE_FILE}" =~ .*(contain|dock)erfile.* ]]; then
################################ ################################
# Append the file to the array # # Append the file to the array #
################################ ################################
FILE_ARRAY_DOCKERFILE+=("${FILE}")
FILE_ARRAY_DOCKERFILE_HADOLINT+=("${FILE}") FILE_ARRAY_DOCKERFILE_HADOLINT+=("${FILE}")
##################### #####################

View file

@ -95,8 +95,6 @@ COFFEESCRIPT_FILE_NAME=".coffee-lint.json"
CSS_FILE_NAME="${CSS_FILE_NAME:-.stylelintrc.json}" CSS_FILE_NAME="${CSS_FILE_NAME:-.stylelintrc.json}"
# shellcheck disable=SC2034 # Variable is referenced indirectly # shellcheck disable=SC2034 # Variable is referenced indirectly
DART_FILE_NAME="analysis_options.yml" DART_FILE_NAME="analysis_options.yml"
# shellcheck disable=SC2034 # Variable is referenced indirectly
DOCKERFILE_FILE_NAME=".dockerfilelintrc"
DOCKERFILE_HADOLINT_FILE_NAME="${DOCKERFILE_HADOLINT_FILE_NAME:-.hadolint.yaml}" DOCKERFILE_HADOLINT_FILE_NAME="${DOCKERFILE_HADOLINT_FILE_NAME:-.hadolint.yaml}"
EDITORCONFIG_FILE_NAME="${EDITORCONFIG_FILE_NAME:-.ecrc}" EDITORCONFIG_FILE_NAME="${EDITORCONFIG_FILE_NAME:-.ecrc}"
# shellcheck disable=SC2034 # Variable is referenced indirectly # shellcheck disable=SC2034 # Variable is referenced indirectly
@ -235,7 +233,7 @@ fi
################## ##################
LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CLANG_FORMAT' LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'BASH_EXEC' 'CLANG_FORMAT'
'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CPP' 'CSHARP' 'CSS' 'DART' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CPP' 'CSHARP' 'CSS' 'DART'
'DOCKERFILE' 'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV' 'GITHUB_ACTIONS' 'DOCKERFILE_HADOLINT' 'EDITORCONFIG' 'ENV' 'GITHUB_ACTIONS'
'GITLEAKS' 'GHERKIN' 'GO' 'GOOGLE_JAVA_FORMAT' 'GROOVY' 'HTML' 'JAVA' 'GITLEAKS' 'GHERKIN' 'GO' 'GOOGLE_JAVA_FORMAT' 'GROOVY' 'HTML' 'JAVA'
'JAVASCRIPT_ES' "${JAVASCRIPT_STYLE_NAME}" 'JSCPD' 'JSON' 'JSONC' 'JSX' 'JAVASCRIPT_ES' "${JAVASCRIPT_STYLE_NAME}" 'JSCPD' 'JSON' 'JSONC' 'JSX'
'KUBERNETES_KUBEVAL' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN' 'NATURAL_LANGUAGE' 'KUBERNETES_KUBEVAL' 'KOTLIN' 'LATEX' 'LUA' 'MARKDOWN' 'NATURAL_LANGUAGE'
@ -263,7 +261,6 @@ LINTER_NAMES_ARRAY['CPP']="cpplint"
LINTER_NAMES_ARRAY['CSHARP']="dotnet-format" LINTER_NAMES_ARRAY['CSHARP']="dotnet-format"
LINTER_NAMES_ARRAY['CSS']="stylelint" LINTER_NAMES_ARRAY['CSS']="stylelint"
LINTER_NAMES_ARRAY['DART']="dart" LINTER_NAMES_ARRAY['DART']="dart"
LINTER_NAMES_ARRAY['DOCKERFILE']="dockerfilelint"
LINTER_NAMES_ARRAY['DOCKERFILE_HADOLINT']="hadolint" LINTER_NAMES_ARRAY['DOCKERFILE_HADOLINT']="hadolint"
LINTER_NAMES_ARRAY['EDITORCONFIG']="editorconfig-checker" LINTER_NAMES_ARRAY['EDITORCONFIG']="editorconfig-checker"
LINTER_NAMES_ARRAY['ENV']="dotenv-linter" LINTER_NAMES_ARRAY['ENV']="dotenv-linter"
@ -868,8 +865,6 @@ LINTER_COMMANDS_ARRAY['CPP']="cpplint"
LINTER_COMMANDS_ARRAY['CSHARP']="dotnet-format --folder --check --exclude / --include" LINTER_COMMANDS_ARRAY['CSHARP']="dotnet-format --folder --check --exclude / --include"
LINTER_COMMANDS_ARRAY['CSS']="stylelint --config ${CSS_LINTER_RULES}" LINTER_COMMANDS_ARRAY['CSS']="stylelint --config ${CSS_LINTER_RULES}"
LINTER_COMMANDS_ARRAY['DART']="dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" LINTER_COMMANDS_ARRAY['DART']="dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}"
# NOTE: dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file
LINTER_COMMANDS_ARRAY['DOCKERFILE']="dockerfilelint -c $(dirname "${DOCKERFILE_LINTER_RULES}")"
LINTER_COMMANDS_ARRAY['DOCKERFILE_HADOLINT']="hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" LINTER_COMMANDS_ARRAY['DOCKERFILE_HADOLINT']="hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}"
LINTER_COMMANDS_ARRAY['EDITORCONFIG']="editorconfig-checker -config ${EDITORCONFIG_LINTER_RULES}" LINTER_COMMANDS_ARRAY['EDITORCONFIG']="editorconfig-checker -config ${EDITORCONFIG_LINTER_RULES}"
LINTER_COMMANDS_ARRAY['ENV']="dotenv-linter" LINTER_COMMANDS_ARRAY['ENV']="dotenv-linter"

View file

@ -105,7 +105,6 @@ control "super-linter-installed-commands" do
{ linter_name: "coffeelint"}, { linter_name: "coffeelint"},
{ linter_name: "cpplint"}, { linter_name: "cpplint"},
{ linter_name: "dart"}, { linter_name: "dart"},
{ linter_name: "dockerfilelint"},
{ linter_name: "dotnet-format"}, { linter_name: "dotnet-format"},
{ linter_name: "dotenv-linter"}, { linter_name: "dotenv-linter"},
{ linter_name: "editorconfig-checker", version_option: "-version"}, { linter_name: "editorconfig-checker", version_option: "-version"},
@ -302,7 +301,6 @@ control "super-linter-installed-npm-packages" do
"asl-validator", "asl-validator",
#"axios", #"axios",
"babel-eslint", "babel-eslint",
"dockerfilelint",
#"eslint", #"eslint",
"eslint-config-airbnb", "eslint-config-airbnb",
"eslint-config-prettier", "eslint-config-prettier",
@ -403,7 +401,6 @@ control "super-linter-validate-files" do
"/action/lib/.automation/.chktexrc", "/action/lib/.automation/.chktexrc",
"/action/lib/.automation/.clj-kondo", "/action/lib/.automation/.clj-kondo",
"/action/lib/.automation/.coffee-lint.json", "/action/lib/.automation/.coffee-lint.json",
"/action/lib/.automation/.dockerfilelintrc",
"/action/lib/.automation/.ecrc", "/action/lib/.automation/.ecrc",
"/action/lib/.automation/.eslintrc.yml", "/action/lib/.automation/.eslintrc.yml",
"/action/lib/.automation/.flake8", "/action/lib/.automation/.flake8",