Skip to content

Improve Dockerfile with Hadolint suggestions#7

Open
channelbeta wants to merge 1 commit into
max:masterfrom
channelbeta:improve-dockerfile
Open

Improve Dockerfile with Hadolint suggestions#7
channelbeta wants to merge 1 commit into
max:masterfrom
channelbeta:improve-dockerfile

Conversation

@channelbeta
Copy link
Copy Markdown

This PR updates the Dockerfile according to Hadolint suggestions.

The ignored checks (3013 and 3018) are related to pinning package versions.

Before:

docker run --rm -i hadolint/hadolint < Dockerfile
-:3 DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
-:3 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
-:5 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:5 DL3018 warning: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
-:5 DL3019 info: Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages

After:

docker run --rm -i hadolint/hadolint < Dockerfile

...no complaints :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant