Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Melhorar Dockerfile utilizando o hadolint #84

Open
huogerac opened this issue May 21, 2024 · 0 comments
Open

Melhorar Dockerfile utilizando o hadolint #84

huogerac opened this issue May 21, 2024 · 0 comments
Labels
enhancement New feature or request HACKTOBERFEST

Comments

@huogerac
Copy link
Contributor

huogerac commented May 21, 2024

Hadolint é um linter de Dockerfile, podemos corrigir as sugestões e deixar o Dockerfile do projeto melhor...

❯ hadolint Dockerfile 
Dockerfile:8 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
Dockerfile:8 DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
Dockerfile:8 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
Dockerfile:17 DL4005 warning: Use SHELL to change the default shell
Dockerfile:17 SC2140 warning: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
Dockerfile:29 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`

Como instalar hadolint no Debian:

sudo wget -O /bin/hadolint https://github.com/hadolint/hadolint/releases/download/v2.9.3/hadolint-Linux-x86_64
sudo chmod +x /bin/hadolint

#check hadolint install 
hadolint --help
@huogerac huogerac added enhancement New feature or request backend labels May 21, 2024
@huogerac huogerac added this to the v3.0.5 Hacktoberfest 2024 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HACKTOBERFEST
Projects
None yet
Development

No branches or pull requests

1 participant