I’m having trouble with the linter, I couldn’t understand the warning.
output linter:
[INFO] Initializing environment for https://github.com/pycqa/flake8.
[INFO] Initializing environment for https://github.com/pycqa/flake8:flake8==6.0.0.
[INFO] Initializing environment for https://github.com/AleksaC/hadolint-py.
[INFO] Initializing environment for https://github.com/shellcheck-py/shellcheck-py.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Initializing environment for https://github.com/google/yapf.
[INFO] Installing environment for https://github.com/AleksaC/hadolint-py.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Hadolint.................................................................Failed
- hook id: hadolint
- exit code: 1
DL3009 info: Delete the apt-get lists after installing something
image docker:
RUN apt-get update &&
apt-get install -y --no-install-recommends
libgl1-mesa-glx &&
Pass the linter without warnings
You will need to add one more step inside the script, like the following example:
RUN apt-get update &&
apt-get install -y --no-install-recommends
libgl1-mesa-glx &&
rm -rf /var/lib/apt/lists/*
output:
[INFO] Initializing environment for https://github.com/pycqa/flake8.
[INFO] Initializing environment for https://github.com/pycqa/flake8:flake8==6.0.0.
[INFO] Initializing environment for https://github.com/AleksaC/hadolint-py.
[INFO] Initializing environment for https://github.com/shellcheck-py/shellcheck-py.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Initializing environment for https://github.com/google/yapf.
[INFO] Installing environment for https://github.com/AleksaC/hadolint-py.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Hadolint.................................................................Passed